From: Andrew Lunn <andrew@lunn.ch>
To: Dan Murphy <dmurphy@ti.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
davem@davemloft.net, hkallweit1@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: phy: dp83867: Fix various styling and space issues
Date: Thu, 3 Sep 2020 22:42:16 +0200 [thread overview]
Message-ID: <20200903204216.GC3112546@lunn.ch> (raw)
In-Reply-To: <4d38ac31-8646-2c4f-616c-1a1341721819@ti.com>
> > > #define DP83867_CFG4_SGMII_ANEG_MASK (BIT(5) | BIT(6))
> > > #define DP83867_CFG4_SGMII_ANEG_TIMER_11MS (3 << 5)
> > > #define DP83867_CFG4_SGMII_ANEG_TIMER_800US (2 << 5)
> > > -#define DP83867_CFG4_SGMII_ANEG_TIMER_2US (1 << 5)
> > > +#define DP83867_CFG4_SGMII_ANEG_TIMER_2US BIT(5)
> >
> > Now the definitions are inconsistent, you would want to drop this one
> > and stick to the existing style.
>
> OK I was a little conflicted making that change due to the reasons you
> mentioned. But if that is an acceptable warning I am ok with it.
Hi Dan
I work around this by using hex:
#define DP83867_CFG4_SGMII_ANEG_TIMER_11MS (0x3 << 5)
#define DP83867_CFG4_SGMII_ANEG_TIMER_800US (0x2 << 5)
#define DP83867_CFG4_SGMII_ANEG_TIMER_2US (0x1 << 5)
checkpatch does not complain about that.
Andrew
prev parent reply other threads:[~2020-09-03 20:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 14:15 [PATCH net] net: phy: dp83867: Fix various styling and space issues Dan Murphy
2020-09-03 16:34 ` Florian Fainelli
2020-09-03 16:41 ` Dan Murphy
2020-09-03 16:51 ` Florian Fainelli
2020-09-03 16:54 ` Joe Perches
2020-09-03 20:42 ` Andrew Lunn [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=20200903204216.GC3112546@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dmurphy@ti.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.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).