Re: [PATCH bpf-next v3 3/3] libbpf: add missing SPDX-License-Identifier

From: Philippe Ombredanne
Date: Fri Dec 29 2017 - 07:36:25 EST


Eric,

On Thu, Dec 28, 2017 at 9:04 AM, Eric Leblond <eric@xxxxxxxxx> wrote:
> Signed-off-by: Eric Leblond <eric@xxxxxxxxx>
> Acked-by: Alexei Starovoitov <ast@xxxxxxxxxx>
> ---
> tools/lib/bpf/bpf.c | 2 ++
> tools/lib/bpf/bpf.h | 2 ++
> tools/lib/bpf/libbpf.c | 2 ++
> tools/lib/bpf/libbpf.h | 2 ++
> 4 files changed, 8 insertions(+)
>
> diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
> index cdfabbe118cc..9e53dbbca2bd 100644
> --- a/tools/lib/bpf/bpf.c
> +++ b/tools/lib/bpf/bpf.c
> @@ -1,3 +1,5 @@
> +/* SPDX-License-Identifier: LGPL-2.1 */


In a .c file these should using C++-style comments as in //.
As requested by Linus, discussed on list and documented in Thomas doc patches.

> +
> /*
> * common eBPF ELF operations.
> *
> diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h
> index 9f44c196931e..8d18fb73d7fb 100644
> --- a/tools/lib/bpf/bpf.h
> +++ b/tools/lib/bpf/bpf.h
> @@ -1,3 +1,5 @@
> +/* SPDX-License-Identifier: LGPL-2.1 */

And this is correct for a .h

> +
> /*
> * common eBPF ELF operations.
> *
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 5fe8aaa2123e..878e240a681b 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -1,3 +1,5 @@
> +/* SPDX-License-Identifier: LGPL-2.1 */

Use // here.

> +
> /*
> * Common eBPF ELF object loading operations.
> *
> diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
> index e42f96900318..f85906533cdd 100644
> --- a/tools/lib/bpf/libbpf.h
> +++ b/tools/lib/bpf/libbpf.h
> @@ -1,3 +1,5 @@
> +/* SPDX-License-Identifier: LGPL-2.1 */
> +
> /*
> * Common eBPF ELF object loading operations.
> *
> --
> 2.15.1
>


--
Cordially
Philippe Ombredanne