Re: [PATCH 1/1] net: stmmac: dwmac4: extract MAC_HW_Feature regs MSB first

From: Furong Xu
Date: Fri Aug 11 2023 - 00:14:34 EST


On Thu, 10 Aug 2023 15:59:25 +0200
Andrew Lunn <andrew@xxxxxxx> wrote:

> On Thu, Aug 10, 2023 at 05:59:29PM +0800, Furong Xu wrote:
> > The bit extraction sequences are a little messy.
> > No code changes, just reorder them.
>
> How is this substantially better?
>
> If bugs are found in this code, your change is going to make it harder
> to back port the fixes to stable kernels. cherry-pick is unlikely to
> work, it will need a human to look at it. Not hard, but still effort
> for somebody.
>
> So i think there needs to be a clear benefit to this, and you should
> mention the benefit in the commit message.
>
> Andrew

Hi Andrew, Alexandre

In Synopsys databook, the description tables about all registers
start with the MSB.
So we can read one line code and then check it against one table row,
and goto next line of code against next row of table.

I agree with that this commit make cherry-pick less compatible.

If the benefit above is not worthy enough, we abandon this commit :)

Thanks.