* Re: + rcu-fix-sparse-shadowed-variable-warning.patch added to -mm tree [not found] <200808280322.m7S3MOUg004835@imap1.linux-foundation.org> @ 2008-08-28 3:31 ` Alexey Dobriyan 2008-08-28 3:51 ` Harvey Harrison 0 siblings, 1 reply; 2+ messages in thread From: Alexey Dobriyan @ 2008-08-28 3:31 UTC (permalink / raw) To: linux-kernel; +Cc: harvey.harrison, mingo, paulmck > --- a/kernel/rcuclassic.c~rcu-fix-sparse-shadowed-variable-warning > +++ a/kernel/rcuclassic.c > @@ -561,15 +561,15 @@ static void __rcu_process_callbacks(stru > local_irq_restore(flags); > > if (rcu_batch_after(rdp->batch, rcp->pending)) { > - unsigned long flags; > + unsigned long flags2; > > /* and start it/schedule start if it's a new batch */ > - spin_lock_irqsave(&rcp->lock, flags); > + spin_lock_irqsave(&rcp->lock, flags2); > if (rcu_batch_after(rdp->batch, rcp->pending)) { > rcp->pending = rdp->batch; > rcu_start_batch(rcp); > } > - spin_unlock_irqrestore(&rcp->lock, flags); > + spin_unlock_irqrestore(&rcp->lock, flags2); > } > } Bzzzrt... just remove second variable. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: + rcu-fix-sparse-shadowed-variable-warning.patch added to -mm tree 2008-08-28 3:31 ` + rcu-fix-sparse-shadowed-variable-warning.patch added to -mm tree Alexey Dobriyan @ 2008-08-28 3:51 ` Harvey Harrison 0 siblings, 0 replies; 2+ messages in thread From: Harvey Harrison @ 2008-08-28 3:51 UTC (permalink / raw) To: Alexey Dobriyan; +Cc: linux-kernel, mingo, paulmck On Thu, 2008-08-28 at 07:31 +0400, Alexey Dobriyan wrote: > > --- a/kernel/rcuclassic.c~rcu-fix-sparse-shadowed-variable-warning > > +++ a/kernel/rcuclassic.c > > @@ -561,15 +561,15 @@ static void __rcu_process_callbacks(stru > > local_irq_restore(flags); > > > > if (rcu_batch_after(rdp->batch, rcp->pending)) { > > - unsigned long flags; > > + unsigned long flags2; > > > > /* and start it/schedule start if it's a new batch */ > > - spin_lock_irqsave(&rcp->lock, flags); > > + spin_lock_irqsave(&rcp->lock, flags2); > > if (rcu_batch_after(rdp->batch, rcp->pending)) { > > rcp->pending = rdp->batch; > > rcu_start_batch(rcp); > > } > > - spin_unlock_irqrestore(&rcp->lock, flags); > > + spin_unlock_irqrestore(&rcp->lock, flags2); > > } > > } > > Bzzzrt... just remove second variable. > >From my original e-mail: It would be safe in this case to just remove the second declaration of flags and reuse it as it is outside the local_irq_save/restore pair. I did it this way in case there are future changes that might mix up the use of flags. Feel free to just remove the second flags declaration if you'd rather do it that way. Cheers, Harvey ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-28 3:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200808280322.m7S3MOUg004835@imap1.linux-foundation.org>
2008-08-28 3:31 ` + rcu-fix-sparse-shadowed-variable-warning.patch added to -mm tree Alexey Dobriyan
2008-08-28 3:51 ` Harvey Harrison
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox