staging: gdm72xx: enclose complex define statement
PATCH 1/1 staging: gdm72xx: enclose complex define statement
This patch fixes the warning found by checkpatch.pl:
ERROR: Macros with complex values should be enclosed in parentheses
--- drivers/staging/gdm72xx/usb_ids.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gdm72xx/usb_ids.h +2 -2
@@ -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)})#define USB_DEVICE_CDC_DATA (vid, pid) \ {USB_DEVICE_INTF((vid), (pid), USB_CLASS_CDC_DATA)}
Signature · 1 line
1.7.10.4
Greg KH
maintainerQuoted 13 lines · Jaime Arrocha
This patch fixes the warning found by checkpatch.pl:
ERROR: Macros with complex values should be enclosed in parenthesesSigned-off-by Jaime Arrocha <[email protected]>--- drivers/staging/gdm72xx/usb_ids.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/gdm72xx/usb_ids.h +0
-0
drivers/staging/gdm72xx/usb_ids.h line 36
Quoted 7 lines
drivers/staging/gdm72xx/usb_ids.h +2
-2@@ -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?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Greg KH
maintainerQuoted 30 lines · Jaime Arrocha
---- On Tue, 21 Apr 2015 07:40:15 +0000 Greg KH<[email protected]> wrote ----
Quoted 24 lines · Jaime Arrocha
Quoted 13 lines
This patch fixes the warning found by checkpatch.pl:
ERROR: Macros with complex values should be enclosed in parenthesesSigned-off-by Jaime Arrocha <[email protected]>---
drivers/staging/gdm72xx/usb_ids.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/gdm72xx/usb_ids.h +0
-0drivers/staging/gdm72xx/usb_ids.h line 36
Quoted 7 lines
drivers/staging/gdm72xx/usb_ids.h +2
-2@@ -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.
Quoted 2 lines
Does this even compile?
Quoted 6 lines
Yes. It did. I compiled the module against 3.2.0-4-amd64 from Debian and 4.0.0 vanilla from kernel.org. One thing that I don't understand is this:
[jaime@hpsylinux staging]$ make -C
/lib/modules/3.2.0-4-amd64/buildM=$PWD/drivers/staging/gdm72xx/ modules
make: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64'
Building modules, stage 2.
MODPOST 0 modules
That implies you didn't select the driver to be built in your .config file. Are you sure you did that?
Quoted 10 lines
make: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64'
[jaime@hpsylinux staging]$ make -C/lib/modules/4.0.0/buildM=$PWD/drivers/staging/gdm72xx/ modules
make: Entering directory `/home/jaime/Pprojects/linux_kernel/linux-4.0'
Building modules, stage 2.
MODPOST 0 modules
make: Leaving directory `/home/jaime/Pprojects/linux_kernel/linux-4.0'MODPOST 0 modules? I get the same result without making the patch changes. To resolve this I'll test this on another machine.
I compiled the whole 4.0.0 kernel and got the image with no problems after making the patch changes.
if you touch the file, and do a 'make -j8' does the file rebuild? If not, then you didn't select the config option.
thanks,
greg k-h