lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACtES-qmpRJ2mk+1vhsJm55G6j6U1+rLB1t2izHwJ1u4_eUKHw@mail.gmail.com>
Date:   Mon, 15 Jun 2020 10:28:51 +0100
From:   Ricardo Ferreira <rikajff@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Larry Finger <Larry.Finger@...inger.net>,
        devel@...verdev.osuosl.org,
        Florian Schilhabel <florian.c.schilhabel@...glemail.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Nishka Dasgupta <nishkadg.linux@...il.com>,
        Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] Staging: rtl8712: Addressed checkpatch.pl issues related
 to macro parameter wrapping in parentheses.

On Sun, 14 Jun 2020 at 15:05, Greg Kroah-Hartman
<gregkh@...uxfoundation.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.

Regards,
Ricardo Ferreira.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ