Re: [PATCH] staging: rtl8712: Add parenthesis to Macro argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 13, 2019 at 06:26:52PM -0300, christianluciano.m@xxxxxxxxx wrote:
> From: Christian Luciano Moreno <christianluciano.m@xxxxxxxxx>
> 
> Add parenthesis to Macro argument to avoid precedence issues.
> 
> Signed-off-by: Christian Luciano Moreno <christianluciano.m@xxxxxxxxx>
> ---
>  drivers/staging/rtl8712/basic_types.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8712/basic_types.h b/drivers/staging/rtl8712/basic_types.h
> index 4ad7f35b1644..3e6d4ff45a75 100644
> --- a/drivers/staging/rtl8712/basic_types.h
> +++ b/drivers/staging/rtl8712/basic_types.h
> @@ -21,7 +21,7 @@
>  
>  #define SIZE_T __kernel_size_t
>  #define sint signed int
> -#define FIELD_OFFSET(s, field)	((addr_t)&((s *)(0))->field)
> +#define FIELD_OFFSET(s, field)	((addr_t)&(((s) *)(0))->(field))
>  

This change makes no sense, and it breaks the build, which implies you
did not test it at all :(

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux