[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB8510A9464D0D0B9260C56F8188D6A@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Tue, 18 Nov 2025 03:04:49 +0000
From: Wei Fang <wei.fang@....com>
To: Frank Li <frank.li@....com>
CC: Shenwei Wang <shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>,
"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"eric@...int.com" <eric@...int.com>, "imx@...ts.linux.dev"
<imx@...ts.linux.dev>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next 2/5] net: fec: simplify the conditional
preprocessor directives
> > On Wed, Nov 12, 2025 at 01:53:15AM +0000, Wei Fang wrote:
> > > > > - if (!of_machine_is_compatible("fsl,imx6ul")) {
> > > > > - reg_list = fec_enet_register_offset;
> > > > > - reg_cnt = ARRAY_SIZE(fec_enet_register_offset);
> > > > > - } else {
> > > > > +
> > > > > +#if !defined(CONFIG_M5272) || defined(CONFIG_COMPILE_TEST)
> > > > > + if (of_machine_is_compatible("fsl,imx6ul")) {
> > > >
> > > > There are stub of_machine_is_compatible(), so needn't #ifdef here.
> > > >
> > >
> > > fec_enet_register_offset_6ul is not defined when CONFIG_M5272 is
> > > enabled, so we still need it here.
> >
> > Is it possible to remove ifdef for fec_enet_register_offset_6ul?
> >
>
> Yes, I will move fec_enet_register_offset_6ul out of the "#ifdef " guard.
Sorry, remove the guard for fec_enet_register_offset_6ul will cause
build errors, because there are many macros are not defined for M5272.
I'm going to use this version in v3.
Powered by blists - more mailing lists