lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock, 0) in kernel_kexec()

* Andrew Morton <akpm@linux-foundation.org> wrote:

> > instead? Not that that's really right either, but at least it avoids
> > the _ridiculous_ crap. The real solution is probably to use a
> > spinlock and trylock/unlock.
>
> Or test_and_set_bit(). That's what I've been saying too, only
> differently ;)
>
> But cleaning up the long-standing silly usage of xchg() is a different
> activity from suppressing this recently-added compile warning.

actually, in this case i disagree: the warning here is a canary that
there's something wrong about this code - i.e. gcc is _right_ about
warning us. The warning is also totally harmless - the warning shows us
the suckiness of the code structure - and squashing the warning doesnt
fix that.

So im coal-mine analogies, i disagree with squashing the canary, we
should find and fix the shaft that emits the smelly methane instead ;-)

Ingo


\
 
 \ /
  Last update: 2008-08-13 20:03    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site