linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saurav Girepunje <saurav.girepunje@gmail.com>
To: b-liu@ti.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: saurav.girepunje@hotmail.com
Subject: [PATCH] usb: musb: davinci: change the variable type
Date: Mon, 19 Apr 2021 00:06:18 +0530	[thread overview]
Message-ID: <20210418183618.GA69452@user> (raw)

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


             reply	other threads:[~2021-04-18 18:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18 18:36 Saurav Girepunje [this message]
2021-04-22  8:49 ` [PATCH] usb: musb: davinci: change the variable type Greg KH
2021-04-27 19:37   ` SAURAV GIREPUNJE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210418183618.GA69452@user \
    --to=saurav.girepunje@gmail.com \
    --cc=b-liu@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=saurav.girepunje@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).