linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rfkill: properly assign a boolean type
Date: Fri, 16 Sep 2011 15:37:17 +0200	[thread overview]
Message-ID: <1316180237.4130.37.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1316180020-9982-1-git-send-email-mohammed@qca.qualcomm.com>

On Fri, 2011-09-16 at 19:03 +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
> 
> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
> ---
>  net/rfkill/core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/rfkill/core.c b/net/rfkill/core.c
> index be90640..5be1957 100644
> --- a/net/rfkill/core.c
> +++ b/net/rfkill/core.c
> @@ -235,7 +235,7 @@ static bool __rfkill_set_hw_state(struct rfkill *rfkill,
>  	else
>  		rfkill->state &= ~RFKILL_BLOCK_HW;
>  	*change = prev != blocked;
> -	any = rfkill->state & RFKILL_BLOCK_ANY;
> +	any = !!(rfkill->state & RFKILL_BLOCK_ANY);

I believe this is not necessary since "any" is a "bool" and as such
should cast correctly to 0/1.

johannes


  reply	other threads:[~2011-09-16 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16 13:33 [PATCH] rfkill: properly assign a boolean type Mohammed Shafi Shajakhan
2011-09-16 13:37 ` Johannes Berg [this message]
2011-09-16 13:53   ` mohammed
2011-09-16 14:01     ` Johannes Berg
2011-09-16 14:02       ` mohammed
2011-09-16 14:08         ` Johannes Berg
2011-09-16 14:11           ` mohammed
2011-09-16 14:26           ` mohammed

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=1316180237.4130.37.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mohammed@qca.qualcomm.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).