All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
To: Julia Lawall <julia.lawall@lip6.fr>,
	Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	johan@kernel.org, elder@kernel.org,
	outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] Re: [PATCH] staging: greybus: Add brackets to avoid precedence issues
Date: Tue, 5 Mar 2019 22:39:52 +0530	[thread overview]
Message-ID: <fbf03e1e-4e32-cbeb-4748-17e47d07d238@yahoo.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1903042210360.2591@hadrien>



On 05/03/19 2:42 AM, Julia Lawall wrote:
> 
> 
> On Tue, 5 Mar 2019, Nishka Dasgupta wrote:
> 
>> On Tue, Mar 5, 2019 at 12:32 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>>>
>>> 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.)
>> I thought adding brackets just demarcates the parameter(s)? If that is
>> not necessary or useful, then I won't submit this patch in future.
> 
> I'm not sure what this does.  A macro parameter list shouldn't have
> parentheses in it.  I wonder if cpp sees the parentheses and decides it is
> not a paramater list, but rather part of the macro body?  Are these macros
> actually used?  If not you can just remove them.

Ah, okay, I'll look into whether these macros are actually used.
- Nishka

> julia
> 
> 
>>
>>> thanks,
>>>
>>> greg k-h
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
>>> To post to this group, send email to outreachy-kernel@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190304190228.GD13830%40kroah.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> - Nishka
>>
>> --
>> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
>> To post to this group, send email to outreachy-kernel@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAC4%2B%2BKAwPEjSSTbgnRYXCU%3Dz_WNJAs3rbAtL0XboZ-OCmjCmrg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>


      reply	other threads:[~2019-03-05 17:10 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
2019-03-04 20:12   ` [Outreachy kernel] " Nishka Dasgupta
2019-03-04 21:12     ` Julia Lawall
2019-03-05 17:09       ` Nishka Dasgupta [this message]

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=fbf03e1e-4e32-cbeb-4748-17e47d07d238@yahoo.com \
    --to=nishka.dasgupta@yahoo.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=julia.lawall@lip6.fr \
    --cc=nishka.dasgupta_ug18@ashoka.edu.in \
    --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.