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.
next prev parent 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
[not found] ` <1503683495-11766-2-git-send-email-alcooperx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
[not found] ` <1503683495-11766-1-git-send-email-alcooperx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-02 2:16 ` [PATCH V5 0/4] Add Broadcom STB USB phy driver Florian Fainelli
[not found] ` <f4625f5e-db00-ebcc-4618-6f00247edfab-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-05 6:11 ` Kishon Vijay Abraham I
[not found] ` <f7bb89bf-1a09-891c-4ae5-3dc2e4b38d97-l0cyMroinI0@public.gmane.org>
2017-09-15 23:49 ` Florian Fainelli
[not found] ` <5DDF9572-B2D1-4316-B307-14749365221E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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;
as well as URLs for NNTP newsgroup(s).