* phy: mapphone-mdm6600: Fix wrong enum used for status lines
@ 2018-05-31 17:05 Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2018-05-31 17:05 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: linux-kernel, linux-usb, linux-omap
Kbuilt test robot reported:
drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: warning: is used
uninitialized in this function [-Wuninitialized]
val |= values[i] << i;
~~~~~~^~~
Looking at the phy_mdm6600_status() values does get initialized by
gpiod_get_array_value_cansleep(), but we are using wrong enum
in that function. Let's fix the use, both end up being three though
so urgent rush on this one AFAIK.
Fixes: 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for
MDM6600 on Droid 4")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/phy/motorola/phy-mapphone-mdm6600.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -182,13 +182,13 @@ static void phy_mdm6600_status(struct work_struct *work)
ddata = container_of(work, struct phy_mdm6600, status_work.work);
dev = ddata->dev;
- error = gpiod_get_array_value_cansleep(PHY_MDM6600_NR_CMD_LINES,
+ error = gpiod_get_array_value_cansleep(PHY_MDM6600_NR_STATUS_LINES,
ddata->status_gpios->desc,
values);
if (error)
return;
- for (i = 0; i < PHY_MDM6600_NR_CMD_LINES; i++) {
+ for (i = 0; i < PHY_MDM6600_NR_STATUS_LINES; i++) {
val |= values[i] << i;
dev_dbg(ddata->dev, "XXX %s: i: %i values[i]: %i val: %i\n",
__func__, i, values[i], val);
^ permalink raw reply [flat|nested] 2+ messages in thread
* phy: mapphone-mdm6600: Fix wrong enum used for status lines
@ 2018-06-08 14:50 Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2018-06-08 14:50 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Kishon Vijay Abraham I, linux-kernel, linux-usb, linux-omap
On Thu 2018-05-31 10:05:38, Tony Lindgren wrote:
> Kbuilt test robot reported:
>
> drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: warning: is used
> uninitialized in this function [-Wuninitialized]
> val |= values[i] << i;
> ~~~~~~^~~
>
> Looking at the phy_mdm6600_status() values does get initialized by
> gpiod_get_array_value_cansleep(), but we are using wrong enum
> in that function. Let's fix the use, both end up being three though
> so urgent rush on this one AFAIK.
>
> Fixes: 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for
> MDM6600 on Droid 4")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-08 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-31 17:05 phy: mapphone-mdm6600: Fix wrong enum used for status lines Tony Lindgren
-- strict thread matches above, loose matches on Subject: below --
2018-06-08 14:50 Pavel Machek
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).