linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: David Laight <David.Laight@aculab.com>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] asm-generic: fix ffs -Wshadow warning
Date: Mon, 26 Oct 2020 19:57:21 +0100	[thread overview]
Message-ID: <CAK8P3a37j8v5jWYP1dYkFrie1xgNK-p8St=wOQyEWLhcc8G6Xg@mail.gmail.com> (raw)
In-Reply-To: <086e45b325074fc89f51354901aa5af6@AcuMS.aculab.com>

On Mon, Oct 26, 2020 at 5:44 PM David Laight <David.Laight@aculab.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

      reply	other threads:[~2020-10-26 18:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 15:59 [PATCH] asm-generic: fix ffs -Wshadow warning Arnd Bergmann
2020-10-26 16:44 ` David Laight
2020-10-26 18:57   ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a37j8v5jWYP1dYkFrie1xgNK-p8St=wOQyEWLhcc8G6Xg@mail.gmail.com' \
    --to=arnd@kernel.org \
    --cc=David.Laight@aculab.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).