Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1282458 > unrolled thread

[PATCH v2] usb: ehci: ohci: use true/false for bool

Started by"Geyslan G. Bem" <geyslan@gmail.com>
First post2015-12-02 23:10 +0100
Last post2015-12-03 00:30 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] usb: ehci: ohci: use true/false for bool "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-02 23:10 +0100
    Re: [PATCH v2] usb: ehci: ohci: use true/false for bool Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-02 23:20 +0100
      Re: [PATCH v2] usb: ehci: ohci: use true/false for bool "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-02 23:30 +0100
        Re: [PATCH v2] usb: ehci: ohci: use true/false for bool "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-03 00:30 +0100

#1282458 — [PATCH v2] usb: ehci: ohci: use true/false for bool

From"Geyslan G. Bem" <geyslan@gmail.com>
Date2015-12-02 23:10 +0100
Subject[PATCH v2] usb: ehci: ohci: use true/false for bool
Message-ID<qBnL4-4Iv-3@gated-at.bofh.it>
When declaring/initializing bool use true instead of 1. If it's false,
there's no need to explicit initialize it, once it's default.

Caught by coccinelle.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
 drivers/usb/host/ehci-hcd.c | 2 +-
 drivers/usb/host/ohci-hcd.c | 4 ++--
 drivers/usb/host/u132-hcd.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 48c92bf..1b01967 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -98,7 +98,7 @@ module_param (park, uint, S_IRUGO);
 MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
 
 /* for flakey hardware, ignore overcurrent indicators */
-static bool ignore_oc = 0;
+static bool ignore_oc;
 module_param (ignore_oc, bool, S_IRUGO);
 MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");
 
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 760cb57..5547dbf 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -99,13 +99,13 @@ static void io_watchdog_func(unsigned long _ohci);
 
 
 /* Some boards misreport power switching/overcurrent */
-static bool distrust_firmware = 1;
+static bool distrust_firmware = true;
 module_param (distrust_firmware, bool, 0);
 MODULE_PARM_DESC (distrust_firmware,
 	"true to distrust firmware power/overcurrent setup");
 
 /* Some boards leave IR set wrongly, since they fail BIOS/SMM handshakes */
-static bool no_handshake = 0;
+static bool no_handshake;
 module_param (no_handshake, bool, 0);
 MODULE_PARM_DESC (no_handshake, "true (not default) disables BIOS handshake");
 
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index 692ccc6..05c85c7 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -73,7 +73,7 @@ MODULE_LICENSE("GPL");
 #define INT_MODULE_PARM(n, v) static int n = v;module_param(n, int, 0444)
 INT_MODULE_PARM(testing, 0);
 /* Some boards misreport power switching/overcurrent*/
-static bool distrust_firmware = 1;
+static bool distrust_firmware = true;
 module_param(distrust_firmware, bool, 0);
 MODULE_PARM_DESC(distrust_firmware, "true to distrust firmware power/overcurren"
 	"t setup");
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1282466

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-12-02 23:20 +0100
Message-ID<qBnUK-4LF-9@gated-at.bofh.it>
In reply to#1282458
On Wed, Dec 02, 2015 at 07:09:19PM -0300, Geyslan G. Bem wrote:
> When declaring/initializing bool use true instead of 1. If it's false,
> there's no need to explicit initialize it, once it's default.
> 
> Caught by coccinelle.
> 
> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
> ---
>  drivers/usb/host/ehci-hcd.c | 2 +-
>  drivers/usb/host/ohci-hcd.c | 4 ++--
>  drivers/usb/host/u132-hcd.c | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index 48c92bf..1b01967 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -98,7 +98,7 @@ module_param (park, uint, S_IRUGO);
>  MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
>  
>  /* for flakey hardware, ignore overcurrent indicators */
> -static bool ignore_oc = 0;
> +static bool ignore_oc;

This should be a separate patch as it's doing something differently than
what you describe.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1282472

From"Geyslan G. Bem" <geyslan@gmail.com>
Date2015-12-02 23:30 +0100
Message-ID<qBo4p-4OQ-1@gated-at.bofh.it>
In reply to#1282466
2015-12-02 19:16 GMT-03:00 Greg Kroah-Hartman <gregkh@linuxfoundation.org>:
> On Wed, Dec 02, 2015 at 07:09:19PM -0300, Geyslan G. Bem wrote:
>> When declaring/initializing bool use true instead of 1. If it's false,
>> there's no need to explicit initialize it, once it's default.
>>
>> Caught by coccinelle.
>>
>> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
>> ---
>>  drivers/usb/host/ehci-hcd.c | 2 +-
>>  drivers/usb/host/ohci-hcd.c | 4 ++--
>>  drivers/usb/host/u132-hcd.c | 2 +-
>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
>> index 48c92bf..1b01967 100644
>> --- a/drivers/usb/host/ehci-hcd.c
>> +++ b/drivers/usb/host/ehci-hcd.c
>> @@ -98,7 +98,7 @@ module_param (park, uint, S_IRUGO);
>>  MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
>>
>>  /* for flakey hardware, ignore overcurrent indicators */
>> -static bool ignore_oc = 0;
>> +static bool ignore_oc;
>
> This should be a separate patch as it's doing something differently than
> what you describe.
>
> thanks,
>
> greg k-h

Greg,

I think that the v2 description is ok, the title is misleading indeed.
I'll make a new one entitled "fix bool initialization". Anything else?

Thanks.

-- 
Regards,

Geyslan G. Bem
hackingbits.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1282572

From"Geyslan G. Bem" <geyslan@gmail.com>
Date2015-12-03 00:30 +0100
Message-ID<qBp0u-5qO-25@gated-at.bofh.it>
In reply to#1282472
2015-12-02 19:23 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
> 2015-12-02 19:16 GMT-03:00 Greg Kroah-Hartman <gregkh@linuxfoundation.org>:
>> On Wed, Dec 02, 2015 at 07:09:19PM -0300, Geyslan G. Bem wrote:
>>> When declaring/initializing bool use true instead of 1. If it's false,
>>> there's no need to explicit initialize it, once it's default.
>>>
>>> Caught by coccinelle.
>>>
>>> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
>>> ---
>>>  drivers/usb/host/ehci-hcd.c | 2 +-
>>>  drivers/usb/host/ohci-hcd.c | 4 ++--
>>>  drivers/usb/host/u132-hcd.c | 2 +-
>>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
>>> index 48c92bf..1b01967 100644
>>> --- a/drivers/usb/host/ehci-hcd.c
>>> +++ b/drivers/usb/host/ehci-hcd.c
>>> @@ -98,7 +98,7 @@ module_param (park, uint, S_IRUGO);
>>>  MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
>>>
>>>  /* for flakey hardware, ignore overcurrent indicators */
>>> -static bool ignore_oc = 0;
>>> +static bool ignore_oc;
>>
>> This should be a separate patch as it's doing something differently than
>> what you describe.
>>
>> thanks,
>>
>> greg k-h
>
> Greg,
>
> I think that the v2 description is ok, the title is misleading indeed.
> I'll make a new one entitled "fix bool initialization". Anything else?

Please ignore my last statements.

Report to this: [PATCH] usb: ehci: ohci: fix bool assignments

>
> Thanks.
>
> --
> Regards,
>
> Geyslan G. Bem
> hackingbits.com



-- 
Regards,

Geyslan G. Bem
hackingbits.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web