LKML Archive on
help / color / mirror / Atom feed
From: Quentin Lambert <>
To: "Rafael J. Wysocki" <>
Cc: Zhang Rui <>,
	Robert Moore <>,
	Lv Zheng <>,
	"Rafael J. Wysocki" <>,
	Len Brown <>, Shaohua Li <>,,,
Subject: Re: [PATCH 0/4] int to bool conversion
Date: Mon, 26 Jan 2015 09:30:55 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <1659960.ohcxabvmYi@vostro.rjw.lan>

Sorry for the delay in answering ....

On 22/01/2015 17:18, Rafael J. Wysocki wrote:
> On Thursday, January 22, 2015 09:49:41 AM Quentin Lambert wrote:
>> These patches convert local variables from int to bool when relevant.
> And what exactly is the need for that?  Does that fix any functional problems?
It doesn't fix any functional problem. The point of this patch
is to increase the code readability by lifting some of the ambiguities
that appear when using an integer variable as boolean.

My understanding is that by explicitly using a boolean declaration
when it is relevant it clearly informs the reader that the variable
is going to represent a binary state. Moreover, using the keywords
true and false help indicate that the variable will not be involved
in any computation other than boolean arithmetic.

That being said, I am new to kernel contribution and I feel that
a more compelling case may be made here:


  reply	other threads:[~2015-01-26  8:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  8:49 Quentin Lambert
2015-01-22 16:18 ` Rafael J. Wysocki
2015-01-26  8:30   ` Quentin Lambert [this message]
2015-01-26 13:32     ` Rafael J. Wysocki
2015-02-18 19:09       ` Moore, Robert
2015-01-30 17:32 Louis Langholtz
2015-01-30 18:21 ` Peter Hurley

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH 0/4] int to bool conversion' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).