Skip to contentSkip to conversation

pinctrl/pinctrl-u300: remove unused variable i

PATCH In review Devendra Naga 2 participants 2 messages Jun 18, 2012 – Jun 20, 2012 Pin control

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl/pinctrl-u300: remove unused variable i

the unused variable warning was thrown when compiled using the gcc for ARM (arm-linux-gnueabihf-gcc) with u300_defconfig selected,

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- u300_defconfig

and then

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

gives the following warn,

drivers/pinctrl/pinctrl-u300.c: In function ‘u300_pmx_remove’:
drivers/pinctrl/pinctrl-u300.c:1178:6: warning: unused variable ‘i’ [-Wunused-variable]

---
 drivers/pinctrl/pinctrl-u300.c |    1 -
 1 file changed, 1 deletion(-)
drivers/pinctrl/pinctrl-u300.c +0 -1
index 49b91c2..2ba13c5 100644
@@ -1175,7 +1175,6 @@ out_no_resource:
 static int __devexit u300_pmx_remove(struct platform_device *pdev)
 {
 	struct u300_pmx *upmx = platform_get_drvdata(pdev);
-	int i;
 
 	pinctrl_unregister(upmx->pctl);
 	iounmap(upmx->virtbase);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 7 lines · Devendra Naga

the unused variable warning was thrown when compiled using the gcc for ARM (arm-linux-gnueabihf-gcc) with u300_defconfig selected,

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- u300_defconfig

and then

Quoted 8 lines

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

gives the following warn,

drivers/pinctrl/pinctrl-u300.c: In function ‘u300_pmx_remove’:
drivers/pinctrl/pinctrl-u300.c:1178:6: warning: unused variable ‘i’ [-Wunused-variable]

Incidentally I was working on this code and fixed the same issue, but thanks anyway!

Yours,
Linus Walleij