public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Al Cooper <al.cooper@broadcom.com>,
	Kishon Vijay Abraham I <kishon@ti.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Al Cooper <alcooperx@gmail.com>,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V5 1/4] soc: brcmstb: Add Product ID and Family ID helper functions
Date: Thu, 21 Sep 2017 13:17:52 -0700	[thread overview]
Message-ID: <1506025072.12311.29.camel@perches.com> (raw)
In-Reply-To: <CAGh=XAAzjvSpHK_oaj2OwTswdtCpfKUhg-nL+M_4jM92yMTs=A@mail.gmail.com>

On Thu, 2017-09-21 at 15:16 -0400, Al Cooper wrote:
> Kishon,
> 
> I ran checkpatch on all my patches before submitting them and didn't
> get any warnings. It looks like you may be running checkpatch with the
> "--subjective" option. Is this a requirement and if so are there any
> other checkpatch options I should be using?
> 
> Thanks
> Al
> 
> On Thu, Sep 21, 2017 at 4:54 AM, 'Kishon Vijay Abraham I' via
> BCM-KERNEL-FEEDBACK-LIST,PDL
> <bcm-kernel-feedback-list.pdl@broadcom.com> wrote:
> > Hi,
> > 
> > On Saturday 02 September 2017 07:45 AM, Florian Fainelli wrote:
> > > On 08/25/2017 10:51 AM, Al Cooper wrote:
[]
> > I get the following checkpatch warning
> > CHECK: Macro argument reuse 'reg' - possible side-effects?
> > #110: FILE: include/linux/soc/brcmstb/brcmstb.h:4:
> > +#define BRCM_ID(reg)   ((u32)reg >> 28 ? (u32)reg >> 16 : (u32)reg >> 8)
[]
> > > > diff --git a/include/linux/soc/brcmstb/brcmstb.h b/include/linux/soc/brcmstb/brcmstb.h
> > > > index 337ce41..23e4dc9 100644
> > > > --- a/include/linux/soc/brcmstb/brcmstb.h
> > > > +++ b/include/linux/soc/brcmstb/brcmstb.h
> > > > @@ -1,10 +1,20 @@
> > > >  #ifndef __BRCMSTB_SOC_H
> > > >  #define __BRCMSTB_SOC_H
> > > > 
> > > > +#define BRCM_ID(reg)        ((u32)reg >> 28 ? (u32)reg >> 16 : (u32)reg >> 8)
> > > > +#define BRCM_REV(reg)       ((u32)reg & 0xff)

These should be (reg) to avoid a possible issue with
cast precedence or
maybe a use a statement expression
macro with a temporary to avoid the
reuse message.

  reply	other threads:[~2017-09-21 20:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 17:51 [PATCH V5 0/4] Add Broadcom STB USB phy driver Al Cooper
2017-08-25 17:51 ` [PATCH V5 1/4] soc: brcmstb: Add Product ID and Family ID helper functions Al Cooper
2017-09-02  2:15   ` Florian Fainelli
2017-09-21  8:54     ` Kishon Vijay Abraham I
2017-09-21 19:16       ` Al Cooper
2017-09-21 20:17         ` Joe Perches [this message]
2017-08-25 17:51 ` [PATCH V5 2/4] dt-bindings: Add Broadcom STB USB PHY binding document Al Cooper
2017-08-25 17:51 ` [PATCH V5 3/4] phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver Al Cooper
2017-08-25 17:51 ` [PATCH V5 4/4] phy: usb: phy-brcm-usb: Add ability to force DRD mode to host or device Al Cooper
2017-09-02  2:16 ` [PATCH V5 0/4] Add Broadcom STB USB phy driver Florian Fainelli
2017-09-05  6:11   ` Kishon Vijay Abraham I
2017-09-15 23:49     ` Florian Fainelli
2017-09-20 22:37       ` Florian Fainelli
2017-09-21  9:39         ` Kishon Vijay Abraham I
2017-09-22 18:33           ` Al Cooper

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=1506025072.12311.29.camel@perches.com \
    --to=joe@perches.com \
    --cc=al.cooper@broadcom.com \
    --cc=alcooperx@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox