mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] S3C24xx/GPIO: Clean up formatting
@ 2011-09-28 10:08 Juergen Beisert
  2011-09-28 10:12 ` [PATCH] S3C24xx/GPIO: Fix compile time warning Juergen Beisert
  0 siblings, 1 reply; 4+ messages in thread
From: Juergen Beisert @ 2011-09-28 10:08 UTC (permalink / raw)
  To: barebox

Just a clean up

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

---
 arch/arm/mach-s3c24xx/gpio-s3c24x0.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 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
@@ -67,7 +67,6 @@ int gpio_direction_input(unsigned gpio)
 	return 0;
 }
 
-
 int gpio_direction_output(unsigned gpio, int value)
 {
 	unsigned group = gpio >> 5;
@@ -177,14 +176,12 @@ int gpio_is_valid(int gpio)
 
 	offset = group_offset[group];
 
-
 #ifdef CONFIG_CPU_S3C2440
 	if ((GPADAT + offset) < GPJCON)
 		return 1;
 #else
 	if ((GPADAT + offset) < GPHCON)
 		return 1;
-
 #endif
-		return 0;
-	}
+	return 0;
+}

-- 
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/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH] S3C24xx/GPIO: Fix compile time warning
  2011-09-28 10:08 [PATCH] S3C24xx/GPIO: Clean up formatting Juergen Beisert
@ 2011-09-28 10:12 ` Juergen Beisert
  2011-09-28 11:53   ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Juergen Beisert @ 2011-09-28 10:12 UTC (permalink / raw)
  To: barebox

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@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/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] S3C24xx/GPIO: Fix compile time warning
  2011-09-28 10:12 ` [PATCH] S3C24xx/GPIO: Fix compile time warning Juergen Beisert
@ 2011-09-28 11:53   ` Sascha Hauer
  2011-09-28 12:04     ` Juergen Beisert
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2011-09-28 11:53 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

Hi Jürgen,

On Wed, Sep 28, 2011 at 12:12:10PM +0200, Juergen Beisert wrote:
> 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@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;

Both patches do not apply. We do not have a gpio_is_valid() function
in this file.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] S3C24xx/GPIO: Fix compile time warning
  2011-09-28 11:53   ` Sascha Hauer
@ 2011-09-28 12:04     ` Juergen Beisert
  0 siblings, 0 replies; 4+ messages in thread
From: Juergen Beisert @ 2011-09-28 12:04 UTC (permalink / raw)
  To: barebox

Sascha Hauer wrote:
> On Wed, Sep 28, 2011 at 12:12:10PM +0200, Juergen Beisert wrote:
> > 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@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;
>
> Both patches do not apply. We do not have a gpio_is_valid() function
> in this file.

Arrghh, you are right. /me should use the correct branch...

Juergen

-- 
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/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2011-09-28 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 10:08 [PATCH] S3C24xx/GPIO: Clean up formatting Juergen Beisert
2011-09-28 10:12 ` [PATCH] S3C24xx/GPIO: Fix compile time warning Juergen Beisert
2011-09-28 11:53   ` Sascha Hauer
2011-09-28 12:04     ` Juergen Beisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox