Re: drivers/connector/cn_queue.c:130: warning: value computed is not used
From: Evgeniy Polyakov <[EMAIL PROTECTED]> Date: Tue, 30 May 2006 15:48:38 +0400 > On Tue, May 30, 2006 at 01:34:02PM +0200, Andreas Schwab ([EMAIL PROTECTED]) > wrote: > > There is no point in testing the atomic value if the result is thrown > > away. > > It was created to put implicit smp barrier, but it is not needed there. > Your patch is correct, thank you. Right, the *_and_test() variants have SMP barriers which the normal ones do not. So it is not just a matter of giving a return value or not, there are real side effect differences. > > Signed-off-by: Andreas Schwab <[EMAIL PROTECTED]> > > Signed-off-by: Evgeniy Polyakov <[EMAIL PROTECTED]> But since you say it doesn't matter I'll apply this. Thanks! - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: drivers/connector/cn_queue.c:130: warning: value computed is not used
On Tue, May 30, 2006 at 01:34:02PM +0200, Andreas Schwab ([EMAIL PROTECTED]) wrote: > There is no point in testing the atomic value if the result is thrown > away. It was created to put implicit smp barrier, but it is not needed there. Your patch is correct, thank you. > Signed-off-by: Andreas Schwab <[EMAIL PROTECTED]> Signed-off-by: Evgeniy Polyakov <[EMAIL PROTECTED]> > diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c > index 9f2f00d..05f8ce2 100644 > --- a/drivers/connector/cn_queue.c > +++ b/drivers/connector/cn_queue.c > @@ -127,7 +127,7 @@ void cn_queue_del_callback(struct cn_que > > if (found) { > cn_queue_free_callback(cbq); > - atomic_dec_and_test(&dev->refcnt); > + atomic_dec(&dev->refcnt); > } > } > > > Andreas. -- Evgeniy Polyakov - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
drivers/connector/cn_queue.c:130: warning: value computed is not used
There is no point in testing the atomic value if the result is thrown away. Signed-off-by: Andreas Schwab <[EMAIL PROTECTED]> diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 9f2f00d..05f8ce2 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c @@ -127,7 +127,7 @@ void cn_queue_del_callback(struct cn_que if (found) { cn_queue_free_callback(cbq); - atomic_dec_and_test(&dev->refcnt); + atomic_dec(&dev->refcnt); } } Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html