From: Greg KH <gregkh@linuxfoundation.org>
To: Jaime Arrocha <jarr@kerneldev.net>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: gdm72xx: enclose complex define statement
Date: Tue, 21 Apr 2015 09:40:15 +0200 [thread overview]
Message-ID: <20150421074015.GA10367@kroah.com> (raw)
In-Reply-To: <20150421031150.GA20462@localhost.localdomain>
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?
next prev parent reply other threads:[~2015-04-21 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 3:11 [PATCH] staging: gdm72xx: enclose complex define statement Jaime Arrocha
2015-04-21 7:40 ` Greg KH [this message]
[not found] ` <14cdc5afccf.1127810be45144.8145256611893602942@kerneldev.net>
2015-04-21 15:01 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150421074015.GA10367@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=jarr@kerneldev.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.