linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] make WRITE_ONCE return void
Date: Fri, 8 Jul 2016 01:20:08 +0300	[thread overview]
Message-ID: <20160707222008.GE31678@p183.telecom.by> (raw)

Currently WRITE_ONCE is used as if it returns void. Let's codify this
before somebody tries to be smarter than necessary.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/compiler.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -301,7 +301,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
 	union { typeof(x) __val; char __c[1]; } __u =	\
 		{ .__val = (__force typeof(x)) (val) }; \
 	__write_once_size(&(x), __u.__c, sizeof(x));	\
-	__u.__val;					\
+	(void)0;					\
 })
 
 /**

             reply	other threads:[~2016-07-07 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07 22:20 Alexey Dobriyan [this message]
2016-07-08  8:02 ` [PATCH] make WRITE_ONCE return void Peter Zijlstra
2016-07-08 10:20   ` Alexey Dobriyan

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=20160707222008.GE31678@p183.telecom.by \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@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).