From: biao huang <biao.huang@mediatek.com>
To: David Miller <davem@davemloft.net>
Cc: jianguo.zhang@mediatek.com, alexandre.torgue@st.com,
boon.leong.ong@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, yt.shen@mediatek.com,
joabreu@synopsys.com, linux-mediatek@lists.infradead.org,
mcoquelin.stm32@gmail.com, matthias.bgg@gmail.com,
peppe.cavallaro@st.com, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [v3, PATCH] net: stmmac: add support for hash table size 128/256 in dwmac4
Date: Tue, 28 May 2019 09:52:49 +0800 [thread overview]
Message-ID: <1559008369.24897.66.camel@mhfsdcap03> (raw)
In-Reply-To: <20190527.100800.1719164073038257292.davem@davemloft.net>
Dear David,
On Mon, 2019-05-27 at 10:08 -0700, David Miller wrote:
> From: Biao Huang <biao.huang@mediatek.com>
> Date: Mon, 27 May 2019 11:14:27 +0800
>
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> > index 5e98da4..029a3db 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> > @@ -403,41 +403,50 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
> > struct net_device *dev)
> > {
> > void __iomem *ioaddr = (void __iomem *)dev->base_addr;
> > - unsigned int value = 0;
> > + unsigned int value;
> > + int numhashregs = (hw->multicast_filter_bins >> 5);
> > + int mcbitslog2 = hw->mcast_bits_log2;
> > + int i;
>
> Please retain the reverse christmas tree ordering here.
I'm a little confused about the reverse xmas tree ordering.
should I reorder them only according to the total length like this:
void __iomem *ioaddr = (void __iomem *)dev->base_addr;
int numhashregs = (hw->multicast_filter_bins >> 5);
int mcbitslog2 = hw->mcast_bits_log2;
unsigned int value;
int i;
or should I gather the same type together, and order types as reverse
xmas tree, then order the same type definitions as reverse xmas tree,
like this:
void __iomem *ioaddr = (void __iomem *)dev->base_addr;
unsigned int value;
int numhashregs = (hw->multicast_filter_bins >> 5);
int mcbitslog2 = hw->mcast_bits_log2;
int i;
Thank you.
>
> Thank you.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-05-28 1:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 3:14 [v3, PATCH] add some features in stmmac Biao Huang
2019-05-27 3:14 ` [v3, PATCH] net: stmmac: add support for hash table size 128/256 in dwmac4 Biao Huang
2019-05-27 17:08 ` David Miller
2019-05-28 1:52 ` biao huang [this message]
2019-05-28 16:40 ` Andrew Lunn
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=1559008369.24897.66.camel@mhfsdcap03 \
--to=biao.huang@mediatek.com \
--cc=alexandre.torgue@st.com \
--cc=boon.leong.ong@intel.com \
--cc=davem@davemloft.net \
--cc=jianguo.zhang@mediatek.com \
--cc=joabreu@synopsys.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=yt.shen@mediatek.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