diff mbox series

[U-Boot] usb: xhci: Fix bool initialization in xhci_bulk_tx

Message ID 20180120083731.GA7437@embeddedgus
State Accepted
Commit eacccbda431c4eff9073f2b4abfaba88524cd12f
Delegated to: Marek Vasut
Headers show
Series [U-Boot] usb: xhci: Fix bool initialization in xhci_bulk_tx | expand

Commit Message

Gustavo A. R. Silva Jan. 20, 2018, 8:37 a.m. UTC
Bool initializations should use true and false.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
---
 drivers/usb/host/xhci-ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut Jan. 21, 2018, 4:49 p.m. UTC | #1
On 01/20/2018 09:37 AM, Gustavo A. R. Silva wrote:
> Bool initializations should use true and false.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Marek Vasut <marex@denx.de>

Applied, thanks

> ---
>  drivers/usb/host/xhci-ring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 579e670..7599c91 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -557,7 +557,7 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe,
>  {
>  	int num_trbs = 0;
>  	struct xhci_generic_trb *start_trb;
> -	bool first_trb = 0;
> +	bool first_trb = false;
>  	int start_cycle;
>  	u32 field = 0;
>  	u32 length_field = 0;
>
Gustavo A. R. Silva Jan. 22, 2018, 1:58 a.m. UTC | #2
Quoting Marek Vasut <marek.vasut@gmail.com>:

> On 01/20/2018 09:37 AM, Gustavo A. R. Silva wrote:
>> Bool initializations should use true and false.
>>
>> This issue was detected with the help of Coccinelle.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> Cc: Bin Meng <bmeng.cn@gmail.com>
>> Cc: Marek Vasut <marex@denx.de>
>
> Applied, thanks
>

Thank you, Marek. This is my very first contribution to the Das U-Boot  
project. :)
--
Gustavo
diff mbox series

Patch

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 579e670..7599c91 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -557,7 +557,7 @@  int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe,
 {
 	int num_trbs = 0;
 	struct xhci_generic_trb *start_trb;
-	bool first_trb = 0;
+	bool first_trb = false;
 	int start_cycle;
 	u32 field = 0;
 	u32 length_field = 0;