[PATCH V7 1/6] clk: imx6sl: Use BIT(x) to avoid shifting signed 32-bit value by 31 bits

Arnd Bergmann arnd at arndb.de
Thu Jul 30 03:25:32 EDT 2020


On Thu, Jul 30, 2020 at 3:14 AM Anson Huang <anson.huang at nxp.com> wrote:
> > Subject: Re: [PATCH V7 1/6] clk: imx6sl: Use BIT(x) to avoid shifting signed
> > 32-bit value by 31 bits

> > or you could read Documentation/process/submit-checklist.rst,
> > where rule #1 says:
> >
> > 1) If you use a facility then #include the file that defines/declares
> >    that facility.  Don't depend on other header files pulling in ones
> >    that you use.
>
> Understood, while I search "BIT()" in clk driver, most of the drivers does NOT include
> linux/bits.h even they use it.
>
> But OK, I will send V9 to include it.

Ok, good.

I have a patch series that adds it to a lot of files. Note that linux/bitops.h
itself is a fairly big header with everything else that it includes, and it
is included almost everywhere indirectly.  When we change the other
headers to not require linux/bitops.h any more, everything that uses BIT()
needs to include linux/bits.h.

     Arnd



More information about the linux-arm-kernel mailing list