All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ARM: OMAP2+: Fix build warning when mmc_omap is not built
@ 2021-04-01 13:15 ` Yongqiang Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Yongqiang Liu @ 2021-04-01 13:15 UTC (permalink / raw)
  To: tony, linux; +Cc: linux-arm-kernel, linux-omap, kernel-janitors

GCC reports the following warning with W=1:

arch/arm/mach-omap2/board-n8x0.c:325:19: warning:
variable 'index' set but not used [-Wunused-but-set-variable]
325 |  int bit, *openp, index;
    |                   ^~~~~

Fix this by moving CONFIG_MMC_OMAP to cover the rest codes
in the n8x0_mmc_callback().

Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
---
 arch/arm/mach-omap2/board-n8x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 418a61ecb827..5e86145db0e2 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
 
 static void n8x0_mmc_callback(void *data, u8 card_mask)
 {
+#ifdef CONFIG_MMC_OMAP
 	int bit, *openp, index;
 
 	if (board_is_n800()) {
@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
 	else
 		*openp = 0;
 
-#ifdef CONFIG_MMC_OMAP
 	omap_mmc_notify_cover_event(mmc_device, index, *openp);
 #else
 	pr_warn("MMC: notify cover event not available\n");
-- 
2.25.1


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

* [PATCH -next] ARM: OMAP2+: Fix build warning when mmc_omap is not built
@ 2021-04-01 13:15 ` Yongqiang Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Yongqiang Liu @ 2021-04-01 13:15 UTC (permalink / raw)
  To: tony, linux; +Cc: linux-arm-kernel, linux-omap, kernel-janitors

GCC reports the following warning with W=1:

arch/arm/mach-omap2/board-n8x0.c:325:19: warning:
variable 'index' set but not used [-Wunused-but-set-variable]
325 |  int bit, *openp, index;
    |                   ^~~~~

Fix this by moving CONFIG_MMC_OMAP to cover the rest codes
in the n8x0_mmc_callback().

Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
---
 arch/arm/mach-omap2/board-n8x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 418a61ecb827..5e86145db0e2 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
 
 static void n8x0_mmc_callback(void *data, u8 card_mask)
 {
+#ifdef CONFIG_MMC_OMAP
 	int bit, *openp, index;
 
 	if (board_is_n800()) {
@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
 	else
 		*openp = 0;
 
-#ifdef CONFIG_MMC_OMAP
 	omap_mmc_notify_cover_event(mmc_device, index, *openp);
 #else
 	pr_warn("MMC: notify cover event not available\n");
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] ARM: OMAP2+: Fix build warning when mmc_omap is not built
  2021-04-01 13:15 ` Yongqiang Liu
@ 2021-05-18  6:27   ` Tony Lindgren
  -1 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2021-05-18  6:27 UTC (permalink / raw)
  To: Yongqiang Liu; +Cc: linux, linux-arm-kernel, linux-omap, kernel-janitors

* Yongqiang Liu <liuyongqiang13@huawei.com> [210401 16:09]:
> GCC reports the following warning with W=1:
> 
> arch/arm/mach-omap2/board-n8x0.c:325:19: warning:
> variable 'index' set but not used [-Wunused-but-set-variable]
> 325 |  int bit, *openp, index;
>     |                   ^~~~~
> 
> Fix this by moving CONFIG_MMC_OMAP to cover the rest codes
> in the n8x0_mmc_callback().

Thanks applying into fixes.

Tony

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

* Re: [PATCH -next] ARM: OMAP2+: Fix build warning when mmc_omap is not built
@ 2021-05-18  6:27   ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2021-05-18  6:27 UTC (permalink / raw)
  To: Yongqiang Liu; +Cc: linux, linux-arm-kernel, linux-omap, kernel-janitors

* Yongqiang Liu <liuyongqiang13@huawei.com> [210401 16:09]:
> GCC reports the following warning with W=1:
> 
> arch/arm/mach-omap2/board-n8x0.c:325:19: warning:
> variable 'index' set but not used [-Wunused-but-set-variable]
> 325 |  int bit, *openp, index;
>     |                   ^~~~~
> 
> Fix this by moving CONFIG_MMC_OMAP to cover the rest codes
> in the n8x0_mmc_callback().

Thanks applying into fixes.

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 13:15 [PATCH -next] ARM: OMAP2+: Fix build warning when mmc_omap is not built Yongqiang Liu
2021-04-01 13:15 ` Yongqiang Liu
2021-05-18  6:27 ` Tony Lindgren
2021-05-18  6:27   ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.