lkml.org 
[lkml]   [2013]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: linux-next: build warning after merge of the final tree (Linus' tree related - vai vfs tree)
From
On Fri, Sep 6, 2013 at 9:19 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> After merging the final tree, today's linux-next build (arm defconfig)
> produced this warning:
>
> fs/direct-io.c: In function 'sb_init_dio_done_wq':
> fs/direct-io.c:557:2: warning: value computed is not used [-Wunused-value]
>
> This is:
>
> cmpxchg(&sb->s_dio_done_wq, NULL, wq);
>
> Introduced by commit 7b7a8665edd8 ("direct-io: Implement generic deferred
> AIO completions").

This happens for include/asm-generic/cmpxchg.h and several other
arch-specific implementations that cast the return value of cmpxchg()
like

#define cmpxchg(ptr, o, n) ((__typeof__(*(ptr)))__cmpxchg(....

If the caller of cmpxchg() doesn't use the return value, we get a
compiler warning,
at least with some versions of gcc.

Any idea how to fix this once and for good?

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


\
 
 \ /
  Last update: 2013-09-06 11:21    [W:0.051 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site