drivers/connector/cn_queue.c:130: warning: value computed is not used
Subsystems (2)
There is no point in testing the atomic value if the result is thrown away.
drivers/connector/cn_queue.c +1 -1
@@ -127,7 +127,7 @@ void cn_queue_del_callback(struct cn_queif (found) {cn_queue_free_callback (cbq); -atomic_dec_and_test (&dev->refcnt); +atomic_dec (&dev->refcnt); } }
Andreas.
Signature · 4 lines
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."
Quoted 2 lines · Andreas Schwab
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.
Quoted 1 line
Signed-off-by Andreas Schwab <[email protected]>
Quoted 15 lines
drivers/connector/cn_queue.c +1
-1@@ -127,7 +127,7 @@ void cn_queue_del_callback(struct cn_queif (found) {cn_queue_free_callback (cbq); -atomic_dec_and_test (&dev->refcnt); +atomic_dec (&dev->refcnt); } }Andreas.
Signature · 1 line
Evgeniy Polyakov
David Miller
maintainerFrom: Evgeniy Polyakov <[email protected]>
Date: Tue, 30 May 2006 15:48:38 +0400
Quoted 6 lines · Andreas Schwab
Quoted 2 lines
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.
Quoted 3 lines
Quoted 1 line
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!