On 12/06/2011 01:28 AM, Jesse Brandeburg wrote:

> On Sun, 4 Dec 2011 20:04:52 -0800
> Michael Wang <[email protected]> wrote:
> 
>> From: Michael Wang <[email protected]>
>>
>> Use true and false instead of 1 and 0 when assign value to a bool type
>> variable.
>>
>> Signed-off-by: Michael Wang <[email protected]>
>> ---
>>  drivers/net/ethernet/intel/e1000e/netdev.c |   34
>> ++++++++++++++--------------
>>  1 files changed, 17 insertions(+), 17 deletions(-)
> 
> The change is probably functionally fine, but you didn't explain the
> "why" of the change in the patch description.  To me this just seems
> like an unnecessary change for no real gain in readability or fixing
> any bugs.  Can you elaborate why you wanted to do this?  Are you
> planning on doing it to all kernel drivers?
> 

Hi, Jesse

Thanks for your reply.

Actually, I make this change because of my last patch:
e1000e: Avoid wrong check on TX hang

And I get the suggestion from David, the mail like below.
He want me to use true and false, not 1 and 0.

I just want to keep the same style in e1000e driver, and I really wonder
why we use 0 and 1 at first, is there some special reason?

Thanks,
Michael Wang

-------- Original Message --------
Subject: Re: [net-next 1/6] e1000e: Avoid wrong check on TX hang
Date: Sat, 03 Dec 2011 22:26:59 -0500 (EST)
From: David Miller <[email protected]>
To: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected], [email protected]

From: Jeff Kirsher <[email protected]>
Date: Sat,  3 Dec 2011 03:44:26 -0800

> +     if ((!adapter->tx_hang_recheck) &&



Excessive parenthesis, please remove.

> +             adapter->tx_hang_recheck = 1;



This variable is a bool, set it to true or false.

> +                     adapter->tx_hang_recheck = 0;



Likewise.

> +     adapter->tx_hang_recheck = 0;



Likewise.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


> Yes type bool should probably not have =0 or =1 assigned, but this
> seems more like a job for a coccinelle script across at least all the
> "drivers/net" directory.



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
[email protected]
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