lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210418183618.GA69452@user>
Date:   Mon, 19 Apr 2021 00:06:18 +0530
From:   Saurav Girepunje <saurav.girepunje@...il.com>
To:     b-liu@...com, gregkh@...uxfoundation.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     saurav.girepunje@...mail.com
Subject: [PATCH] usb: musb: davinci: change the variable type

vbus_state is define as bool but on davinci.c assigning a value
'-1' to the bool variable.

Fix the following coccicheck error:

drivers/usb/musb//davinci.c:532:2-18:
ERROR: Assignment of non-0/1 constant to bool variable

By changing the variable type to int.
As vbus_state need more three values/states more required by
vbus_state variable.

 /* 0/1 vs "-1 == unknown/init" */

Signed-off-by: Saurav Girepunje <saurav.girepunje@...gle.com>
---
 drivers/usb/musb/davinci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 704435526394..e3435621a9d9 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -36,7 +36,7 @@ struct davinci_glue {
 	struct device		*dev;
 	struct platform_device	*musb;
 	struct clk		*clk;
-	bool			vbus_state;
+	int			vbus_state;
 	struct gpio_desc	*vbus;
 	struct work_struct	vbus_work;
 };
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ