]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bpf: btf: fix the brackets of BTF_INT_OFFSET()
authorGary Lin <glin@suse.com>
Mon, 13 May 2019 09:45:48 +0000 (17:45 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 14 May 2019 08:05:18 +0000 (10:05 +0200)
'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@suse.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Documentation/bpf/btf.rst
include/uapi/linux/btf.h

index 8820360d00dafb5b7485a73af1b87bdc06257a14..35d83e24dbdbc5ab46d689a820288bed48d6377d 100644 (file)
@@ -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::
index 9310652ca4f96bb56c6f7f561332bcff01511f3a..63ae4a39e58b4de3bfac41cbf7fbf8e15c651658 100644 (file)
@@ -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 */