RE: [PATCH net-next 2/5] net: fec: simplify the conditional preprocessor directives

From: Wei Fang

Date: Thu Nov 13 2025 - 21:20:23 EST


> 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.