* [PATCH] staging: gdm72xx: enclose complex define statement
@ 2015-04-21 3:11 Jaime Arrocha
2015-04-21 7:40 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Jaime Arrocha @ 2015-04-21 3:11 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel
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)})
#define USB_DEVICE_CDC_DATA(vid, pid) \
{USB_DEVICE_INTF((vid), (pid), USB_CLASS_CDC_DATA)}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: gdm72xx: enclose complex define statement
2015-04-21 3:11 [PATCH] staging: gdm72xx: enclose complex define statement Jaime Arrocha
@ 2015-04-21 7:40 ` Greg KH
[not found] ` <14cdc5afccf.1127810be45144.8145256611893602942@kerneldev.net>
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2015-04-21 7:40 UTC (permalink / raw)
To: Jaime Arrocha; +Cc: devel, linux-kernel
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: gdm72xx: enclose complex define statement
[not found] ` <14cdc5afccf.1127810be45144.8145256611893602942@kerneldev.net>
@ 2015-04-21 15:01 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2015-04-21 15:01 UTC (permalink / raw)
To: Jaime Arrocha; +Cc: devel, linux-kernel
On Tue, Apr 21, 2015 at 02:21:32PM +0000, Jaime Arrocha wrote:
>
>
> ---- On Tue, 21 Apr 2015 07:40:15 +0000 Greg KH<gregkh@linuxfoundation.org> wrote ----
> > 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?
> >
>
> 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/build M=$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?
> make: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64'
> [jaime@hpsylinux staging]$ make -C /lib/modules/4.0.0/build M=$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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-21 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 3:11 [PATCH] staging: gdm72xx: enclose complex define statement Jaime Arrocha
2015-04-21 7:40 ` Greg KH
[not found] ` <14cdc5afccf.1127810be45144.8145256611893602942@kerneldev.net>
2015-04-21 15:01 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.