lkml.org 
[lkml]   [2011]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: linux-next: build warning after merge of the rcu tree
    On Wed, Aug 24, 2011 at 08:46:15PM -0400, Arnaud Lacombe wrote:
    > Hi,
    >
    > On Wed, Aug 24, 2011 at 8:27 AM, Paul E. McKenney
    > <paulmck@linux.vnet.ibm.com> wrote:
    > > On Wed, Aug 24, 2011 at 02:23:37PM +1000, Stephen Rothwell wrote:
    > >> Hi Paul,
    > >>
    > >> After merging the rcu tree, today's linux-next build (powerpc
    > >> ppc64_defconfig) produced this warning:
    > >>
    > >> kernel/rtmutex.c: In function '__rt_mutex_slowlock':
    > >> kernel/rtmutex.c:605:3: warning: suggest parentheses around assignment used as truth value
    > >
    > > There actually already are parentheses around it, and the first pass
    > > through the loop it is uninitialized at that point.  But hey, that
    > > is gcc for you!  Does the patch below cure it?
    > >
    > Yes.

    Thank you!

    Thanx, Paul

    > - Arnaud
    >
    > >> Introduced by commit 83841f021d4b ("rcu: Permit rt_mutex_unlock() with
    > >> irqs disabled").
    > >
    > > If it does, then I will fold into that commit.
    > >
    > >                                                        Thanx, Paul
    > >
    > > ------------------------------------------------------------------------
    > >
    > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    > >
    > > diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
    > > index 0222e34..2548f44 100644
    > > --- a/kernel/rtmutex.c
    > > +++ b/kernel/rtmutex.c
    > > @@ -602,7 +602,8 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state,
    > >
    > >                raw_spin_unlock(&lock->wait_lock);
    > >
    > > -               if (was_disabled = irqs_disabled())
    > > +               was_disabled = irqs_disabled();
    > > +               if (was_disabled)
    > >                        local_irq_enable();
    > >
    > >                debug_rt_mutex_print_deadlock(waiter);
    > > --
    > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    > > the body of a message to majordomo@vger.kernel.org
    > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
    > > Please read the FAQ at  http://www.tux.org/lkml/
    > >
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-08-25 07:07    [W:0.026 / U:0.580 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site