[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a7b8df0b-fc24-441e-b735-7bf319608e99@prolan.hu>
Date: Mon, 12 Feb 2024 15:49:42 +0100
From: Csókás Bence <csokas.bence@...lan.hu>
To: Andrew Lunn <andrew@...n.ch>
CC: <netdev@...r.kernel.org>, Jakub Kicinski <kuba@...nel.org>, "David S.
Miller" <davem@...emloft.net>, Wei Fang <wei.fang@....com>, Shenwei Wang
<shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>, NXP Linux Team
<linux-imx@....com>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Francesco Dolcini <francesco.dolcini@...adex.com>, "Marc
Kleine-Budde" <mkl@...gutronix.de>
Subject: Re: [PATCH v2] net: fec: Refactor: #define magic constants
Hi!
2024. 02. 09. 14:53 keltezéssel, Andrew Lunn írta:
>> @@ -1181,7 +1194,7 @@ fec_restart(struct net_device *ndev)
>> if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
>> ((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
>> ndev->phydev && ndev->phydev->pause)) {
>> - rcntl |= FEC_ENET_FCE;
>> + rcntl |= FEC_RCR_FLOWCTL;
>
> This immediately stood out to me while looking at the diff. Its not
> obvious why this is correct. Looking back, i see you removed
> FEC_ENET_FCE, not renamed it.
What do you mean? I replaced FEC_ENET_FCE with FEC_RCR_FLOWCTL, to make
it obvious that it represents a bit in RCR (or `rcntl` as it is called
on this line). How is that not "renaming" it?
> Ideally, you want lots of small patches which are obviously correct.
> This change is not obvious, there is no explanation in the commit
> message etc.
>
> Please keep this patch about straight, obvious, replacement of bit
> shifts with macros.
So, how should I break it up then? One patch for the ECR bits, one for
RCR, one for TX watermark register, one for RACC? Or one commit
introducing the constants, and another replacing usages with these?
> Do all other changes in additional patches. It is much easier to
> review then, both by you before you post, and us when it hits the
> list.
>
> Andrew
>
Thanks,
Bence
Powered by blists - more mailing lists