netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Andreas Schwab <schwab@suse.de>
Cc: netdev@vger.kernel.org
Subject: Re: drivers/connector/cn_queue.c:130: warning: value computed is not used
Date: Tue, 30 May 2006 15:48:38 +0400	[thread overview]
Message-ID: <20060530114838.GA20906@2ka.mipt.ru> (raw)
In-Reply-To: <jeac8zg311.fsf@sykes.suse.de>

On Tue, May 30, 2006 at 01:34:02PM +0200, Andreas Schwab (schwab@suse.de) 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 <schwab@suse.de>

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

> 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

  reply	other threads:[~2006-05-30 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-30 11:34 drivers/connector/cn_queue.c:130: warning: value computed is not used Andreas Schwab
2006-05-30 11:48 ` Evgeniy Polyakov [this message]
2006-05-30 20:11   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060530114838.GA20906@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=netdev@vger.kernel.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).