From: Greg KH <gregkh@linuxfoundation.org>
To: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Cc: johan@kernel.org, elder@kernel.org, outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] staging: greybus: Add brackets to avoid precedence issues
Date: Mon, 4 Mar 2019 20:02:28 +0100 [thread overview]
Message-ID: <20190304190228.GD13830@kroah.com> (raw)
In-Reply-To: <20190304173947.30135-1-nishka.dasgupta@yahoo.com>
On Mon, Mar 04, 2019 at 11:09:47PM +0530, Nishka Dasgupta wrote:
> Add parentheses around arguments to avoid precedence issues. Issue found
> by Checkpatch.
>
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
> ---
> drivers/staging/greybus/camera.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
> index 615c8e7fd51e..7b653a4fd63f 100644
> --- a/drivers/staging/greybus/camera.c
> +++ b/drivers/staging/greybus/camera.c
> @@ -180,9 +180,9 @@ static const struct gb_camera_fmt_info *gb_camera_get_format_info(u16 gb_fmt)
>
> #define GB_CAMERA_MAX_SETTINGS_SIZE 8192
>
> -#define gcam_dbg(gcam, format...) dev_dbg(&gcam->bundle->dev, format)
> -#define gcam_info(gcam, format...) dev_info(&gcam->bundle->dev, format)
> -#define gcam_err(gcam, format...) dev_err(&gcam->bundle->dev, format)
> +#define gcam_dbg((gcam), format...) dev_dbg(&gcam->bundle->dev, format)
> +#define gcam_info((gcam), format...) dev_info(&gcam->bundle->dev, format)
> +#define gcam_err((gcam), format...) dev_err(&gcam->bundle->dev, format)
Please explain how adding an extra () helps anything here.
I think checkpatch is very confused. Always use your brain when running
it, as it is just a perl script and sometimes gets things wrong (like
here.)
thanks,
greg k-h
next prev parent reply other threads:[~2019-03-04 19:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 17:39 [PATCH] staging: greybus: Add brackets to avoid precedence issues Nishka Dasgupta
2019-03-04 19:02 ` Greg KH [this message]
2019-03-04 20:12 ` [Outreachy kernel] " Nishka Dasgupta
2019-03-04 21:12 ` Julia Lawall
2019-03-05 17:09 ` Nishka Dasgupta
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=20190304190228.GD13830@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=elder@kernel.org \
--cc=johan@kernel.org \
--cc=nishka.dasgupta@yahoo.com \
--cc=outreachy-kernel@googlegroups.com \
/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.