public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ricardo Ferreira <rikajff@gmail.com>
Cc: devel@driverdev.osuosl.org,
	Florian Schilhabel <florian.c.schilhabel@googlemail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Nishka Dasgupta <nishkadg.linux@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: [PATCH] Staging: rtl8712: Addressed checkpatch.pl issues related to macro parameter wrapping in parentheses.
Date: Mon, 15 Jun 2020 14:34:39 +0200	[thread overview]
Message-ID: <20200615123439.GB943330@kroah.com> (raw)
In-Reply-To: <CACtES-qmpRJ2mk+1vhsJm55G6j6U1+rLB1t2izHwJ1u4_eUKHw@mail.gmail.com>

On Mon, Jun 15, 2020 at 10:28:51AM +0100, Ricardo Ferreira wrote:
> On Sun, 14 Jun 2020 at 15:05, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Sun, Jun 14, 2020 at 02:51:25PM +0100, Ricardo Ferreira wrote:
> > >  #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
> > >  do {\
> > > -     INIT_LIST_HEAD(&pcmd->list);\
> > > -     pcmd->cmdcode = code;\
> > > -     pcmd->parmbuf = (u8 *)(pparm);\
> > > -     pcmd->cmdsz = sizeof(*pparm);\
> > > -     pcmd->rsp = NULL;\
> > > -     pcmd->rspsz = 0;\
> > > +     INIT_LIST_HEAD(&(pcmd)->list);\
> > > +     (pcmd)->cmdcode = code;\
> > > +     (pcmd)->parmbuf = (u8 *)((pparm));\
> > > +     (pcmd)->cmdsz = sizeof(*(pparm));\
> > > +     (pcmd)->rsp = NULL;\
> > > +     (pcmd)->rspsz = 0;\
> > >  } while (0)
> >
> > Does that change really make any sense?  checkpatch is a nice hint,
> > sometimes it is not correct...
> 
> (Replying again since I mistakenly sent my comments only to Greg...)
> 
> Yeah I was over-eager and applied some of checkpatche's patches
> without thinking twice... I guess the parenthesis wrapping only makes
> sense when you have an operator (either binary or unary). I've
> rechecked each macro identified by checkpatch to see if there is a
> need for parenthesis wrapping in their current usage.

Yes, please do that, and also test-build your patches.  Sending patches
that break the build are a sure way to make maintainers grumpy :)

thanks,

greg k-h

  reply	other threads:[~2020-06-15 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 13:51 [PATCH] Staging: rtl8712: Addressed checkpatch.pl issues related to macro parameter wrapping in parentheses Ricardo Ferreira
2020-06-14 14:05 ` Greg Kroah-Hartman
2020-06-15  9:28   ` Ricardo Ferreira
2020-06-15 12:34     ` Greg Kroah-Hartman [this message]
2020-06-14 17:51 ` kernel test robot
2020-06-14 18:58 ` kernel test robot

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=20200615123439.GB943330@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nishkadg.linux@gmail.com \
    --cc=rikajff@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox