linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Ungerer <gerg@linux-m68k.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] m68k: avoid xchg() warning
Date: Mon, 12 Oct 2020 15:18:44 +0200	[thread overview]
Message-ID: <CAMuHMdUaS=qkGT8YXTHBwW3UJDZay4tt8eOkR0r50-guts6egQ@mail.gmail.com> (raw)
In-Reply-To: <20201008123429.1133896-1-arnd@arndb.de>

On Thu, Oct 8, 2020 at 2:34 PM Arnd Bergmann <arnd@arndb.de> wrote:
> gcc warns about the value of xchg()/cmpxchg() being unused
> in some cases:
>
> net/core/filter.c: In function 'bpf_clear_redirect_map':
> arch/m68k/include/asm/cmpxchg.h:137:3: warning: value computed is not used [-Wunused-value]
>   106 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
> net/core/filter.c:3595:4: note: in expansion of macro 'cmpxchg'
>  3595 |    cmpxchg(&ri->map, map, NULL);
>
> Shut up that warning like we do on other architectures, by
> turning the macro into a statement expression.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k for-v5.11 branch.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      reply	other threads:[~2020-10-12 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 12:34 [PATCH] m68k: avoid xchg() warning Arnd Bergmann
2020-10-12 13:18 ` Geert Uytterhoeven [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='CAMuHMdUaS=qkGT8YXTHBwW3UJDZay4tt8eOkR0r50-guts6egQ@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=gerg@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.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).