On Mon, May 13, 2019 at 3:23 AM Gary Lin <glin@xxxxxxxx> wrote: > > 'VAL' should be protected by the brackets. > > v2: > * Squash the fix for Documentation/bpf/btf.rst > > Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") > Signed-off-by: Gary Lin <glin@xxxxxxxx> > --- > Documentation/bpf/btf.rst | 2 +- > include/uapi/linux/btf.h | 2 +- Can you please also sync btf.h into tools/include/uapi/linux/btf.h? But as a separate patch, because otherwise it will cause issues when syncing libbpf into github.com/libbpf/libbpf repo. Thanks! > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/bpf/btf.rst b/Documentation/bpf/btf.rst > index 8820360d00da..35d83e24dbdb 100644 > --- a/Documentation/bpf/btf.rst > +++ b/Documentation/bpf/btf.rst > @@ -131,7 +131,7 @@ The following sections detail encoding of each kind. > ``btf_type`` is followed by a ``u32`` with the following bits arrangement:: > > #define BTF_INT_ENCODING(VAL) (((VAL) & 0x0f000000) >> 24) > - #define BTF_INT_OFFSET(VAL) (((VAL & 0x00ff0000)) >> 16) > + #define BTF_INT_OFFSET(VAL) (((VAL) & 0x00ff0000) >> 16) > #define BTF_INT_BITS(VAL) ((VAL) & 0x000000ff) > > The ``BTF_INT_ENCODING`` has the following attributes:: > diff --git a/include/uapi/linux/btf.h b/include/uapi/linux/btf.h > index 9310652ca4f9..63ae4a39e58b 100644 > --- a/include/uapi/linux/btf.h > +++ b/include/uapi/linux/btf.h > @@ -83,7 +83,7 @@ struct btf_type { > * is the 32 bits arrangement: > */ > #define BTF_INT_ENCODING(VAL) (((VAL) & 0x0f000000) >> 24) > -#define BTF_INT_OFFSET(VAL) (((VAL & 0x00ff0000)) >> 16) > +#define BTF_INT_OFFSET(VAL) (((VAL) & 0x00ff0000) >> 16) > #define BTF_INT_BITS(VAL) ((VAL) & 0x000000ff) > > /* Attributes stored in the BTF_INT_ENCODING */ > -- > 2.21.0 >