[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFBinCAxa8=bc8CkLzBpjEUL9usBVZ4YVKxRNG6Bv31ao-7Nfw@mail.gmail.com>
Date: Mon, 21 Dec 2020 15:31:49 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Pavel Machek <pavel@....cz>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Jerome Brunet <jbrunet@...libre.com>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH 5.9 14/49] net: stmmac: dwmac-meson8b: fix mask definition
of the m250_sel mux
Hi Pavel,
On Sun, Dec 20, 2020 at 12:13 AM Pavel Machek <pavel@....cz> wrote:
>
> On Sat 2020-12-19 23:38:25, Martin Blumenstingl wrote:
> > Hi Pavel,
> >
> > On Sat, Dec 19, 2020 at 10:51 PM Pavel Machek <pavel@....cz> wrote:
> > [...]
> > > I can't say I like this one:
> > >
> > >
> > > > clk_configs->m250_mux.reg = dwmac->regs + PRG_ETH0;
> > > > - clk_configs->m250_mux.shift = PRG_ETH0_CLK_M250_SEL_SHIFT;
> > > > - clk_configs->m250_mux.mask = PRG_ETH0_CLK_M250_SEL_MASK;
> > > > + clk_configs->m250_mux.shift = __ffs(PRG_ETH0_CLK_M250_SEL_MASK);
> > >
> > > It replaces constant with computation done at runtime; compiler can't
> > > optimize it as __ffs is implemented with asm().
> > what do you suggest to use instead?
> > personally I don't see a problem because this is only called once at
> > driver probe time.
>
> I believe canonical solution is version before this patch, just with
> fixed values....
OK, thanks for the hint
I will keep it in my for patches in the future
Best regards,
Martin
Powered by blists - more mailing lists