From: Stafford Horne <shorne@gmail.com> To: linux-kernel@vger.kernel.org Cc: openrisc@lists.librecores.org, Stafford Horne <shorne@gmail.com>, Jonas Bonn <jonas@southpole.se>, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>, "Peter Zijlstra (Intel)" <peterz@infradead.org> Subject: [PATCH 1/3] openrisc: xchg: fix `computed is not used` warning Date: Tue, 14 Mar 2017 23:56:26 +0900 [thread overview] Message-ID: <44f79fa18a167e2fb175c93cab20c775814dd1b7.1489502779.git.shorne@gmail.com> (raw) In-Reply-To: <cover.1489502779.git.shorne@gmail.com> In-Reply-To: <cover.1489502779.git.shorne@gmail.com> When building allmodconfig this warning shows. fs/ocfs2/file.c: In function 'ocfs2_file_write_iter': ./arch/openrisc/include/asm/cmpxchg.h:81:3: warning: value computed is not used [-Wunused-value] ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr)))) ^ Applying the same patch logic that was done to the cmpxchg macro. Signed-off-by: Stafford Horne <shorne@gmail.com> --- arch/openrisc/include/asm/cmpxchg.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/include/asm/cmpxchg.h b/arch/openrisc/include/asm/cmpxchg.h index 5fcb9ac..f0a5d8b 100644 --- a/arch/openrisc/include/asm/cmpxchg.h +++ b/arch/openrisc/include/asm/cmpxchg.h @@ -77,7 +77,11 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr, return val; } -#define xchg(ptr, with) \ - ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr)))) +#define xchg(ptr, with) \ + ({ \ + (__typeof__(*(ptr))) __xchg((unsigned long)(with), \ + (ptr), \ + sizeof(*(ptr))); \ + }) #endif /* __ASM_OPENRISC_CMPXCHG_H */ -- 2.9.3
WARNING: multiple messages have this Message-ID (diff)
From: Stafford Horne <shorne@gmail.com> To: openrisc@lists.librecores.org Subject: [OpenRISC] [PATCH 1/3] openrisc: xchg: fix `computed is not used` warning Date: Tue, 14 Mar 2017 23:56:26 +0900 [thread overview] Message-ID: <44f79fa18a167e2fb175c93cab20c775814dd1b7.1489502779.git.shorne@gmail.com> (raw) In-Reply-To: <cover.1489502779.git.shorne@gmail.com> When building allmodconfig this warning shows. fs/ocfs2/file.c: In function 'ocfs2_file_write_iter': ./arch/openrisc/include/asm/cmpxchg.h:81:3: warning: value computed is not used [-Wunused-value] ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr)))) ^ Applying the same patch logic that was done to the cmpxchg macro. Signed-off-by: Stafford Horne <shorne@gmail.com> --- arch/openrisc/include/asm/cmpxchg.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/include/asm/cmpxchg.h b/arch/openrisc/include/asm/cmpxchg.h index 5fcb9ac..f0a5d8b 100644 --- a/arch/openrisc/include/asm/cmpxchg.h +++ b/arch/openrisc/include/asm/cmpxchg.h @@ -77,7 +77,11 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr, return val; } -#define xchg(ptr, with) \ - ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr)))) +#define xchg(ptr, with) \ + ({ \ + (__typeof__(*(ptr))) __xchg((unsigned long)(with), \ + (ptr), \ + sizeof(*(ptr))); \ + }) #endif /* __ASM_OPENRISC_CMPXCHG_H */ -- 2.9.3
next prev parent reply other threads:[~2017-03-14 15:00 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-14 14:56 [PATCH 0/3] Openrisc fixes for 4.11 Stafford Horne 2017-03-14 14:56 ` [OpenRISC] " Stafford Horne 2017-03-14 14:56 ` Stafford Horne [this message] 2017-03-14 14:56 ` [OpenRISC] [PATCH 1/3] openrisc: xchg: fix `computed is not used` warning Stafford Horne 2017-03-14 14:56 ` [PATCH 2/3] openrisc: fix issue handling 8 byte get_user calls Stafford Horne 2017-03-14 14:56 ` [OpenRISC] " Stafford Horne 2017-03-14 14:56 ` [PATCH 3/3] openrisc: Export symbols needed by modules Stafford Horne 2017-03-14 14:56 ` [OpenRISC] " Stafford Horne 2017-03-14 15:25 ` Geert Uytterhoeven 2017-03-14 15:25 ` Geert Uytterhoeven 2017-03-14 22:17 ` Stafford Horne 2017-03-14 22:17 ` Stafford Horne
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=44f79fa18a167e2fb175c93cab20c775814dd1b7.1489502779.git.shorne@gmail.com \ --to=shorne@gmail.com \ --cc=jonas@southpole.se \ --cc=linux-kernel@vger.kernel.org \ --cc=openrisc@lists.librecores.org \ --cc=peterz@infradead.org \ --cc=stefan.kristiansson@saunalahti.fi \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.