linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: cmpxchg: update macros to prevent warnings
Date: Fri, 20 Dec 2013 14:10:02 +0000	[thread overview]
Message-ID: <20131220141000.GA11954@localhost> (raw)
In-Reply-To: <1387543334-14036-1-git-send-email-broonie@kernel.org>

On Fri, Dec 20, 2013 at 12:42:14PM +0000, Mark Brown wrote:
> From: Mark Hambleton <mahamble@broadcom.com>
> 
> Make sure the value we are going to return is referenced in order to
> avoid warnings from newer GCCs such as:
> 
> arch/arm64/include/asm/cmpxchg.h:162:3: warning: value computed is not used [-Wunused-value]
>   ((__typeof__(*(ptr)))__cmpxchg_mb((ptr),   \
>    ^
> net/netfilter/nf_conntrack_core.c:674:2: note: in expansion of macro ???cmpxchg???
>   cmpxchg(&nf_conntrack_hash_rnd, 0, rand);
> 
> [Modified to use the current underlying implementation as current
> mainline for both cmpxchg() and cmpxchg_local() does -- broonie]
> 
> Signed-off-by: Mark Hambleton <mahamble@broadcom.com>
> Signed-off-by: Mark Brown <broonie@linaro.org>

I merged the previous one (should be in -next as of last night), I guess
it's the same since the patch doesn't have a version number. But I
wonder whether uses of cmpxchg without checking the return value are
sane.

-- 
Catalin

  reply	other threads:[~2013-12-20 14:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 12:42 [PATCH] arm64: cmpxchg: update macros to prevent warnings Mark Brown
2013-12-20 14:10 ` Catalin Marinas [this message]
2013-12-20 16:02   ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2013-12-03 19:19 Mark Brown
2013-12-03 19:15 Mark Brown
2013-12-03 19:20 ` Mark Brown
2013-12-04 19:29 ` Will Deacon
2013-12-04 19:38   ` Mark Brown

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=20131220141000.GA11954@localhost \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).