Skip to contentSkip to conversation

usb: isp1301-omap: Add missing gpiod_add_lookup_table function

PATCH In review Maciej Falkowski 4 participants 4 messages Apr 1, 2021 – May 18, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: isp1301-omap: Add missing gpiod_add_lookup_table function

The gpiod table was added without any usage making it unused as reported by Clang compilation from omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-h2.c:347:34: warning: unused variable 'isp1301_gpiod_table' [-Wunused-variable]

static struct gpiod_lookup_table isp1301_gpiod_table = {
                                 ^

1 warning generated.

The patch adds the missing gpiod_add_lookup_table() function.

Fixes f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors")
---
 arch/arm/mach-omap1/board-h2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap1/board-h2.c +3 -1
index c40cf5ef8607..977b0b744c22 100644
@@ -320,7 +320,7 @@ static int tps_setup(struct i2c_client *client, void *context)
 {
 	if (!IS_BUILTIN(CONFIG_TPS65010))
 		return -ENOSYS;
-	
+
 	tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V |
 				TPS_LDO1_ENABLE | TPS_VLDO1_3_0V);
 
@@ -394,6 +394,8 @@ static void __init h2_init(void)
 	BUG_ON(gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
 	gpio_direction_input(H2_NAND_RB_GPIO_PIN);
 
+	gpiod_add_lookup_table(&isp1301_gpiod_table);
+
 	omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
 	omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
 
Signature · 7 lines
2.26.3


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Maciej Falkowski

The gpiod table was added without any usage making it unused as reported by Clang compilation from omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-h2.c:347:34: warning: unused variable 'isp1301_gpiod_table' [-Wunused-variable]

static struct gpiod_lookup_table isp1301_gpiod_table = {
                                 ^
Quoted 7 lines

1 warning generated.

The patch adds the missing gpiod_add_lookup_table() function.

Fixes f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors")

Thanks for the patch!

Quoted 29 lines
---
 arch/arm/mach-omap1/board-h2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap1/board-h2.c +3 -1
index c40cf5ef8607..977b0b744c22 100644
@@ -320,7 +320,7 @@ static int tps_setup(struct i2c_client *client, void *context)
 {
 	if (!IS_BUILTIN(CONFIG_TPS65010))
 		return -ENOSYS;
-	
+
 	tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V |
 				TPS_LDO1_ENABLE | TPS_VLDO1_3_0V);
 
@@ -394,6 +394,8 @@ static void __init h2_init(void)
 	BUG_ON(gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
 	gpio_direction_input(H2_NAND_RB_GPIO_PIN);
 
+	gpiod_add_lookup_table(&isp1301_gpiod_table);
+
 	omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
 	omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
 
Signature · 1 line
2.26.3

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Maciej Falkowski
Quoted 7 lines · Maciej Falkowski

The gpiod table was added without any usage making it unused as reported by Clang compilation from omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-h2.c:347:34: warning: unused variable 'isp1301_gpiod_table' [-Wunused-variable]

static struct gpiod_lookup_table isp1301_gpiod_table = {
                                 ^
Quoted 7 lines

1 warning generated.

The patch adds the missing gpiod_add_lookup_table() function.

Fixes f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors")

Looks consistent to me with other callers of gpiod_add_lookup_table from .init_machine callbacks.

Quoted 27 lines
---
 arch/arm/mach-omap1/board-h2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap1/board-h2.c +3 -2
index c40cf5ef8607..977b0b744c22 100644
@@ -320,7 +320,7 @@ static int tps_setup(struct i2c_client *client, void *context)
 {
        if (!IS_BUILTIN(CONFIG_TPS65010))
                return -ENOSYS;
-
+
        tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V |
                                TPS_LDO1_ENABLE | TPS_VLDO1_3_0V);
 
@@ -394,6 +394,8 @@ static void __init h2_init(void)
        BUG_ON(gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
        gpio_direction_input(H2_NAND_RB_GPIO_PIN);
 
+       gpiod_add_lookup_table(&isp1301_gpiod_table);
+
        omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
        omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
 
--
Signature · 2 lines
Thanks,
~Nick Desaulniers
reviewer
#3 lore raw
In reply to Maciej Falkowski
Quoted 9 lines · Maciej Falkowski

The gpiod table was added without any usage making it unused as reported by Clang compilation from omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-h2.c:347:34: warning: unused variable 'isp1301_gpiod_table' [-Wunused-variable]

static struct gpiod_lookup_table isp1301_gpiod_table = {
                                 ^

1 warning generated.

The patch adds the missing gpiod_add_lookup_table() function.

Applying into fixes thanks.

Tony