linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	linux-wireless@vger.kernel.org, Ivo van Doorn <ivdoorn@gmail.com>
Subject: Re: [PATCH 2/2] rfkill: use strict_strtoul
Date: Sun, 17 Aug 2008 21:31:52 +0200	[thread overview]
Message-ID: <200808172131.52721.mb@bu3sch.de> (raw)
In-Reply-To: <20080817181617.GA30679@tuxdriver.com>

On Sunday 17 August 2008 20:16:17 John W. Linville wrote:
> On Sat, Aug 02, 2008 at 02:56:26PM -0300, Henrique de Moraes Holschuh wrote:
> > Switch sysfs parsing to something that actually works properly.
> 
> > @@ -402,7 +410,7 @@ static ssize_t rfkill_claim_store(struct device *dev,
> >  	if (error)
> >  		return error;
> >  
> > -	if (rfkill->user_claim != claim) {
> > +	if (!!rfkill->user_claim != !!claim) {
> >  		if (!claim) {
> >  			mutex_lock(&rfkill->mutex);
> >  			rfkill_toggle_radio(rfkill,
> 
> This looks a bit funny.  Is the '!!' in front of 'rfkill->user_claim'
> really necessary?  Especially since...

You can remove the !! in front of rfkill->user_claim, because rfkill->user_claim
is bool anyway. The compiler will implicitely apply !! to it where it is needed.

-- 
Greetings Michael.

  reply	other threads:[~2008-08-17 19:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-02 17:56 [GIT PATCH] rfkill fixes, set 3 Henrique de Moraes Holschuh
2008-08-02 17:56 ` [PATCH 1/2] rfkill: protect suspended rfkill controllers Henrique de Moraes Holschuh
2008-08-02 18:25   ` Ivo van Doorn
2008-08-02 17:56 ` [PATCH 2/2] rfkill: use strict_strtoul Henrique de Moraes Holschuh
2008-08-02 18:25   ` Ivo van Doorn
2008-08-17 18:16   ` John W. Linville
2008-08-17 19:31     ` Michael Buesch [this message]
2008-08-19 21:53     ` Henrique de Moraes Holschuh

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=200808172131.52721.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=hmh@hmh.eng.br \
    --cc=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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).