Skip to contentSkip to conversation

drivers/gpio/da8xx_gpio.c: Fix build warning

PATCH New Anatolij Gustschin 4 participants 5 messages Dec 7, 2011 – Dec 30, 2011

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

PATCH 1/1 drivers/gpio/da8xx_gpio.c: Fix build warning

Fix:
da8xx_gpio.c: In function 'gpio_toggle_value':
da8xx_gpio.c:208:23: warning: variable 'bank' set but not used [-Wunused-but-set-variable]

---
 drivers/gpio/da8xx_gpio.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/gpio/da8xx_gpio.c +0 -3
index 7a15614..74b58e8 100644
@@ -205,9 +205,6 @@ void gpio_free(int gp)
 
 void gpio_toggle_value(int gp)
 {
-	struct davinci_gpio *bank;
-
-	bank = GPIO_BANK(gp);
 	gpio_set_value(gp, !gpio_get_value(gp));
 }
 
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 drivers/mmc/mv_sdhci.c: Fix build warning

Fix:
mv_sdhci.c: In function 'mv_sdh_init':
mv_sdhci.c:47:22: warning: the comparison will always evaluate as 'true' for the address of 'mv_sdhci_writeb' will never be NULL [-Waddress]

---
 drivers/mmc/mv_sdhci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/mv_sdhci.c +1 -2
index 1501974..2fe34b6 100644
@@ -44,8 +44,7 @@ int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks)
 	host->quirks = quirks;
 #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
 	memset(&mv_ops, 0, sizeof(struct sdhci_ops));
-	if (mv_sdhci_writeb != NULL)
-		mv_ops.write_b = mv_sdhci_writeb;
+	mv_ops.write_b = mv_sdhci_writeb;
 	host->ops = &mv_ops;
 #endif
 	if (quirks & SDHCI_QUIRK_REG32_RW)
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 1/1 drivers/mmc/mv_sdhci.c: Fix build warning

Hi Anatolij,

Quoted 30 lines · Anatolij Gustschin

Fix:
mv_sdhci.c: In function 'mv_sdh_init':
mv_sdhci.c:47:22: warning: the comparison will always evaluate as 'true' for the address of 'mv_sdhci_writeb' will never be NULL [-Waddress]

---
?drivers/mmc/mv_sdhci.c | ? ?3 +--
?1 files changed, 1 insertions(+), 2 deletions(-)

drivers/mmc/mv_sdhci.c +0 -0
index 1501974..2fe34b6 100644
@@ -44,8 +44,7 @@ int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks)
 ? ? ? ?host->quirks = quirks;

?#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
? ? ? ?memset(&mv_ops, 0, sizeof(struct sdhci_ops));
- ? ? ? if (mv_sdhci_writeb != NULL)
- ? ? ? ? ? ? ? mv_ops.write_b = mv_sdhci_writeb;
+ ? ? ? mv_ops.write_b = mv_sdhci_writeb;
? ? ? ?host->ops = &mv_ops;
?#endif
? ? ? ?if (quirks & SDHCI_QUIRK_REG32_RW)
--
1.7.5.4

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Thanks for pointing it out!

#4 lore raw

PATCH 1/1 drivers/gpio/da8xx_gpio.c: Fix build warning

In reply to Anatolij Gustschin

Dear Anatolij Gustschin,

Quoted 9 lines · In message <[email protected]> you wrote:

Fix:
da8xx_gpio.c: In function 'gpio_toggle_value':
da8xx_gpio.c:208:23: warning: variable 'bank' set but not used [-Wunused-but-set-variable]

---
 drivers/gpio/da8xx_gpio.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Albert, Sandeep, Tom: hope thisis OK with you.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We shall reach greater and greater platitudes of achievement."
- Richard J. Daley