[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a37j8v5jWYP1dYkFrie1xgNK-p8St=wOQyEWLhcc8G6Xg@mail.gmail.com>
Date: Mon, 26 Oct 2020 19:57:21 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: David Laight <David.Laight@...lab.com>
Cc: "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] asm-generic: fix ffs -Wshadow warning
On Mon, Oct 26, 2020 at 5:44 PM David Laight <David.Laight@...lab.com> 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
Powered by blists - more mailing lists