Re: [RFC PATCH 1/2] net: include: mii: Refactor: Define LPA_* in terms of ADVERTISE_*

From: Andrew Lunn
Date: Wed Jun 05 2024 - 09:29:46 EST


On Wed, Jun 05, 2024 at 02:16:47PM +0200, Csókás, Bence wrote:
> Ethernet specification mandates that these bits will be equal.
> To reduce the amount of magix hex'es in the code, just define
> them in terms of each other.

Are magic hexes in this context actually bad? In .c files i would
agree. But what you have in effect done is force me into jump another
hoop to find the actual hex value so i can manually decode a register
value. And you have made the compile slightly slower.

These defines have been like this since the beginning of the git
history. Is there a good reason to change them after all that time?

Andrew