Re: [PATCH] asm-generic: fix ffs -Wshadow warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 26, 2020 at 5:44 PM David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> An alternative would be to add #define ffs(x) our_inline_ffs(x)
> before the inline function definition.

Yes, that would also work.

> I though the idea of the __builtin_ prefix was that you could
> have a function with the same name :-(

It does multiple things, but one of the things it does is that
the ffs() falls back to the libc-provided ffs() function. You can
define a global ffs() like the libc implementation does, but
defining your own means that it will be used in place of
the official one, which is what the warning is for.

       Arnd



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux