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 <wang...@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


------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to