[PATCH] S3C24xx/GPIO: Fix compile time warning

Juergen Beisert jbe at pengutronix.de
Wed Sep 28 06:12:10 EDT 2011


Without this patch the compiler spits a warning:

arch/arm/mach-s3c24xx/gpio-s3c24x0.c: In function 'gpio_is_valid':
arch/arm/mach-s3c24xx/gpio-s3c24x0.c:176:11: warning: unused variable 'reg'
arch/arm/mach-s3c24xx/gpio-s3c24x0.c:174:11: warning: unused variable 'bit'

Signed-off-by: Juergen Beisert <jbe at pengutronix.de>

---
 arch/arm/mach-s3c24xx/gpio-s3c24x0.c |    2 --
 1 file changed, 2 deletions(-)

Index: barebox-git/arch/arm/mach-s3c24xx/gpio-s3c24x0.c
===================================================================
--- barebox-git.orig/arch/arm/mach-s3c24xx/gpio-s3c24x0.c
+++ barebox-git/arch/arm/mach-s3c24xx/gpio-s3c24x0.c
@@ -170,9 +170,7 @@ void s3c_gpio_mode(unsigned gpio_mode)
 int gpio_is_valid(int gpio)
 {
 	unsigned group = gpio >> 5;
-	unsigned bit = gpio % 32;
 	unsigned offset;
-	uint32_t reg;
 
 	offset = group_offset[group];
 

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |



More information about the barebox mailing list