diff mbox series

[bpf-next,1/2] bpf: btf: fix the brackets of BTF_INT_OFFSET()

Message ID 20190513091158.6200-1-glin@suse.com
State Changes Requested
Headers show
Series [bpf-next,1/2] bpf: btf: fix the brackets of BTF_INT_OFFSET() | expand

Commit Message

Gary Lin May 13, 2019, 9:11 a.m. UTC
'VAL' should be protected by the brackets.

Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
Signed-off-by: Gary Lin <glin@suse.com>
---
 include/uapi/linux/btf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Borkmann May 13, 2019, 9:26 a.m. UTC | #1
On 05/13/2019 11:11 AM, Gary Lin wrote:
> 'VAL' should be protected by the brackets.
> 
> Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
> Signed-off-by: Gary Lin <glin@suse.com>
> ---
>  include/uapi/linux/btf.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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 */
> 

I'm okay with that fix, but could you please squash patch 1 and
patch 2 into a single one? I don't think it's worth splitting them
here.

Thanks,
Daniel
diff mbox series

Patch

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 */