[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63152382-b614-c960-888e-723c955bb109@gmail.com>
Date: Thu, 21 Sep 2023 10:50:55 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Lukasz Majewski <lukma@...x.de>, Tristram.Ha@...rochip.com,
Eric Dumazet <edumazet@...gle.com>, Andrew Lunn <andrew@...n.ch>,
davem@...emloft.net, Woojung Huh <woojung.huh@...rochip.com>,
Vladimir Oltean <olteanv@...il.com>, Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH v5 net-next 4/5] net: dsa: microchip: move REG_SW_MAC_ADDR
to dev->info->regs[]
On 9/20/23 04:43, Lukasz Majewski wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
>
> Defining macros which have the same name but different values is bad
> practice, because it makes it hard to avoid code duplication. The same
> code does different things, depending on the file it's placed in.
> Case in point, we want to access REG_SW_MAC_ADDR from ksz_common.c, but
> currently we can't, because we don't know which kszXXXX_reg.h to include
> from the common code.
>
> Remove the REG_SW_MAC_ADDR_{0..5} macros from ksz8795_reg.h and
> ksz9477_reg.h, and re-add this register offset to the dev->info->regs[]
> array.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> Signed-off-by: Lukasz Majewski <lukma@...x.de>
Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
--
Florian
Powered by blists - more mailing lists