From: Michael Wang <wangyun@linux.vnet.ibm.com>
To: Joe Perches <joe@perches.com>
Cc: jeffrey.t.kirsher@intel.com,
"e1000-devel@lists.sourceforge.net"
<e1000-devel@lists.sourceforge.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"wangyunlinux@gmail.com" <wangyunlinux@gmail.com>,
"Brandeburg, Jesse" <jesse.brandeburg@intel.com>
Subject: Re: [PATCH v2] e1000e: Assign true and false to bool type variable instead of 1 and 0
Date: Wed, 07 Dec 2011 12:49:35 +0800 [thread overview]
Message-ID: <4EDEF05F.4020901@linux.vnet.ibm.com> (raw)
In-Reply-To: <1323231268.1762.19.camel@joe2Laptop>
On 12/07/2011 12:14 PM, Joe Perches wrote:
> On Tue, 2011-12-06 at 19:43 -0800, Jeff Kirsher wrote:
>> On Tue, 2011-12-06 at 18:33 -0800, Michael Wang wrote:
>>> From: Michael Wang <wangyun@linux.vnet.ibm.com>
>>> Use true and false instead of 1 and 0 when assign value to a bool type
>>> variable.
>> Thanks Michael, I have added your patch to my queue of e1000e patches.
>
> There are more of these uses in intel drivers.
>
> Perhaps you could run this cocci/spatch
> on drivers/net/ethernet/intel/...
>
> $ cat bool.cocci
> @@
> bool b;
> @@
>
> -b = 0;
> +b = false;
>
> @@
> bool b;
> @@
>
> -b = 1;
> +b = true;
>
> $ git ls-files drivers/net/ethernet/intel/ | grep "\.c$" | while read file ; do spatch -in_place -sp_file bool.cocci $file ; done
>
>
Hi, Joe
I think there are lots of such cases in kernel, and I think it is a
legacy issue with some story in it.
The reason I only change the e1000e is that the patch I send before will
broken the style of e1000e, because it's using true and false, not 1 and 0.
I think this will be a huge work if we want to correct all these cases,
and I think the good way is to separate the work to small pieces and
finish them slowly.
Thanks,
Michael Wang
next prev parent reply other threads:[~2011-12-07 4:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 2:33 [PATCH v2] e1000e: Assign true and false to bool type variable instead of 1 and 0 Michael Wang
2011-12-07 3:43 ` Jeff Kirsher
2011-12-07 4:14 ` Joe Perches
2011-12-07 4:49 ` Michael Wang [this message]
2011-12-07 6:01 ` Joe Perches
2011-12-07 6:08 ` Michael Wang
2011-12-07 6:19 ` Joe Perches
2011-12-07 6:36 ` Michael Wang
2011-12-07 7:20 ` Al Viro
2011-12-07 7:39 ` Joe Perches
2011-12-07 9:04 ` Jeff Kirsher
2011-12-07 9:15 ` Michael Wang
2011-12-07 9:19 ` Jeff Kirsher
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=4EDEF05F.4020901@linux.vnet.ibm.com \
--to=wangyun@linux.vnet.ibm.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=wangyunlinux@gmail.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).