linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function
@ 2021-04-01 16:20 Maciej Falkowski
  2021-04-01 16:42 ` Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maciej Falkowski @ 2021-04-01 16:20 UTC (permalink / raw)
  To: aaro.koskinen, tony, linux
  Cc: linux-omap, linux-arm-kernel, linux-kernel, clang-built-linux,
	maciej.falkowski9

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.

Signed-off-by: Maciej Falkowski <maciej.falkowski9@gmail.com>
Fixes: f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors")
Link: https://github.com/ClangBuiltLinux/linux/issues/1325
---
 arch/arm/mach-omap1/board-h2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index c40cf5ef8607..977b0b744c22 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -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);
 
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function
  2021-04-01 16:20 [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function Maciej Falkowski
@ 2021-04-01 16:42 ` Nathan Chancellor
  2021-04-01 19:20 ` Nick Desaulniers
  2021-05-18  6:42 ` Tony Lindgren
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2021-04-01 16:42 UTC (permalink / raw)
  To: Maciej Falkowski
  Cc: aaro.koskinen, tony, linux, linux-omap, linux-arm-kernel,
	linux-kernel, clang-built-linux

On Thu, Apr 01, 2021 at 06:20:32PM +0200, Maciej Falkowski wrote:
> 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.
> 
> Signed-off-by: Maciej Falkowski <maciej.falkowski9@gmail.com>
> Fixes: f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1325

Thanks for the patch!

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  arch/arm/mach-omap1/board-h2.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
> index c40cf5ef8607..977b0b744c22 100644
> --- a/arch/arm/mach-omap1/board-h2.c
> +++ b/arch/arm/mach-omap1/board-h2.c
> @@ -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);
>  
> -- 
> 2.26.3
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function
  2021-04-01 16:20 [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function Maciej Falkowski
  2021-04-01 16:42 ` Nathan Chancellor
@ 2021-04-01 19:20 ` Nick Desaulniers
  2021-05-18  6:42 ` Tony Lindgren
  2 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2021-04-01 19:20 UTC (permalink / raw)
  To: Maciej Falkowski
  Cc: aaro.koskinen, tony, Russell King, linux-omap, Linux ARM, LKML,
	clang-built-linux

On Thu, Apr 1, 2021 at 9:21 AM Maciej Falkowski
<maciej.falkowski9@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Maciej Falkowski <maciej.falkowski9@gmail.com>
> Fixes: f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1325

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

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  arch/arm/mach-omap1/board-h2.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
> index c40cf5ef8607..977b0b744c22 100644
> --- a/arch/arm/mach-omap1/board-h2.c
> +++ b/arch/arm/mach-omap1/board-h2.c
> @@ -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);
>
> --

-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function
  2021-04-01 16:20 [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function Maciej Falkowski
  2021-04-01 16:42 ` Nathan Chancellor
  2021-04-01 19:20 ` Nick Desaulniers
@ 2021-05-18  6:42 ` Tony Lindgren
  2 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2021-05-18  6:42 UTC (permalink / raw)
  To: Maciej Falkowski
  Cc: aaro.koskinen, linux, linux-omap, linux-arm-kernel, linux-kernel,
	clang-built-linux

* Maciej Falkowski <maciej.falkowski9@gmail.com> [210401 19:22]:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-18  6:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 16:20 [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function Maciej Falkowski
2021-04-01 16:42 ` Nathan Chancellor
2021-04-01 19:20 ` Nick Desaulniers
2021-05-18  6:42 ` Tony Lindgren

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).