[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADiBU3-KMVYOO_HXWQ7TRHAohBUrUmnyXhZDYfTNjbrk3UgpAQ@mail.gmail.com>
Date: Thu, 27 May 2021 11:54:06 +0800
From: ChiYuan Huang <u0084500@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: lgirdwood@...il.com, Rob Herring <robh+dt@...nel.org>,
cy_huang <cy_huang@...htek.com>,
lkml <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH v1 2/2] regulator: rt6245: Add support for Richtek RT6245
HI,
Mark Brown <broonie@...nel.org> 於 2021年5月27日 週四 上午2:21寫道:
>
> On Wed, May 26, 2021 at 02:12:58PM +0800, cy_huang wrote:
>
> > + /* xor checksum for bit 6 to 0 */
> > + bit_count = __sw_hweight8(code & RT6245_CODE_MASK);
>
> This doesn't compile with an x86 allmodconfig:
>
> ERROR: modpost: "__sw_hweight8" [drivers/regulator/rt6245-regulator.ko] undefined!
I think I found the problem, x86 only defined __sw_hweight32 and __sw_hweight64.
If user touch hweight8 or 16, it will auto convert to use thest two functions.
And the x86 arch didn't define __sw_hweight8 or __sw_hweight16.
The best way is to use hweight8 macro and let the macro convert it to
arch_hweight8
Ack in next, Thanks for reminding me.
Powered by blists - more mailing lists