Skip to contentSkip to conversation

phy: mapphone-mdm6600: add gpiolib dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Apr 4, 2018 – Apr 5, 2018 Generic PHY framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: mapphone-mdm6600: add gpiolib dependency

Without gpiolib, the gpiod_get_array_value_cansleep() is an empty stub, so gcc notices that the resulting array is never initialized:

drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':
drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]

   val |= values[i] << i;
          ~~~~~~^~~

drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[1]' is used uninitialized in this function [-Werror=uninitialized] drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[2]' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors

With gpiolib enabled, this can't happen and we don't get the warning, so let's just add a Kconfig dependency for it.

Fixes 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")
Cc Tony Lindgren <[email protected]>
---
 drivers/phy/motorola/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/motorola/Kconfig +1 -1
index 82651524ffb9..718f8729701d 100644
@@ -13,7 +13,7 @@ config PHY_CPCAP_USB
 
 config PHY_MAPPHONE_MDM6600
 	tristate "Motorola Mapphone MDM6600 modem USB PHY driver"
-	depends on OF && USB_SUPPORT
+	depends on OF && USB_SUPPORT && GPIOLIB
 	select GENERIC_PHY
 	help
 	  Enable this for MDM6600 USB modem to work on Motorola phones
Signature · 1 line
2.9.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 11 lines · Arnd Bergmann

Without gpiolib, the gpiod_get_array_value_cansleep() is an empty stub, so gcc notices that the resulting array is never initialized:

drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':
drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]

   val |= values[i] << i;
          ~~~~~~^~~

drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[1]' is used uninitialized in this function [-Werror=uninitialized] drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[2]' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors

Quoted 6 lines

With gpiolib enabled, this can't happen and we don't get the warning, so let's just add a Kconfig dependency for it.

Fixes 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")
Cc Tony Lindgren <[email protected]>

-- Sebastian

Quoted 20 lines
---
 drivers/phy/motorola/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/motorola/Kconfig +1 -1
index 82651524ffb9..718f8729701d 100644
@@ -13,7 +13,7 @@ config PHY_CPCAP_USB
 
 config PHY_MAPPHONE_MDM6600
 	tristate "Motorola Mapphone MDM6600 modem USB PHY driver"
-	depends on OF && USB_SUPPORT
+	depends on OF && USB_SUPPORT && GPIOLIB
 	select GENERIC_PHY
 	help
 	  Enable this for MDM6600 USB modem to work on Motorola phones
Signature · 1 line
2.9.0
Acked-by
#2 lore raw
Quoted 14 lines · Sebastian Reichel

Hi,

Quoted 11 lines · Arnd Bergmann

Without gpiolib, the gpiod_get_array_value_cansleep() is an empty stub, so gcc notices that the resulting array is never initialized:

drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':
drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]

   val |= values[i] << i;
          ~~~~~~^~~

drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[1]' is used uninitialized in this function [-Werror=uninitialized] drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[2]' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors

Quoted 8 lines
Quoted 6 lines

With gpiolib enabled, this can't happen and we don't get the warning, so let's just add a Kconfig dependency for it.

Fixes 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")
Cc Tony Lindgren <[email protected]>