lkml.org 
[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: gdm72xx: enclose complex define statement
On Mon, Apr 20, 2015 at 10:11:51PM -0500, Jaime Arrocha wrote:
> This patch fixes the warning found by checkpatch.pl:
> ERROR: Macros with complex values should be enclosed in parentheses
>
> Signed-off-by: Jaime Arrocha <jarr@kerneldev.net>
> ---
> drivers/staging/gdm72xx/usb_ids.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/gdm72xx/usb_ids.h b/drivers/staging/gdm72xx/usb_ids.h
> index 8ce544d..2b50ac6 100644
> --- a/drivers/staging/gdm72xx/usb_ids.h
> +++ b/drivers/staging/gdm72xx/usb_ids.h
> @@ -32,8 +32,8 @@
> #define BL_PID_MASK 0xffc0
>
> #define USB_DEVICE_BOOTLOADER(vid, pid) \
> - {USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD)}, \
> - {USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD|B_DIFF_DL_DRV)}
> + ({USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD)}, \
> + {USB_DEVICE((vid), ((pid)&BL_PID_MASK)|B_DOWNLOAD|B_DIFF_DL_DRV)})

checkpatch isn't always correct. This is one such example.

Does this even compile?


\
 
 \ /
  Last update: 2015-04-21 10:21    [W:0.066 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site