Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 2/7] MIPS: static should be at beginning of declaration
       [not found] <alpine.LNX.2.00.1107092304160.25516@swampdragon.chaosbits.net>
@ 2011-07-09 21:12 ` Jesper Juhl
  2011-08-02  9:24   ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2011-07-09 21:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial, Ralf Baechle, Lars-Peter Clausen, linux-mips

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1509 bytes --]

Make sure that the 'static' keywork is at the beginning of declaration
for arch/mips/include/asm/mach-jz4740/gpio.h

This gets rid of warnings like
  warning: ‘static’ is not at beginning of declaration
when building with -Wold-style-declaration (and/or -Wextra which also
enables it).
Also a few tiny whitespace changes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 arch/mips/include/asm/mach-jz4740/gpio.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/mach-jz4740/gpio.h b/arch/mips/include/asm/mach-jz4740/gpio.h
index 7b74703..1a6482e 100644
--- a/arch/mips/include/asm/mach-jz4740/gpio.h
+++ b/arch/mips/include/asm/mach-jz4740/gpio.h
@@ -25,14 +25,13 @@ enum jz_gpio_function {
     JZ_GPIO_FUNC3,
 };
 
-
 /*
  Usually a driver for a SoC component has to request several gpio pins and
  configure them as funcion pins.
  jz_gpio_bulk_request can be used to ease this process.
  Usually one would do something like:
 
- const static struct jz_gpio_bulk_request i2c_pins[] = {
+ static const struct jz_gpio_bulk_request i2c_pins[] = {
 	JZ_GPIO_BULK_PIN(I2C_SDA),
 	JZ_GPIO_BULK_PIN(I2C_SCK),
  };
@@ -47,8 +46,8 @@ enum jz_gpio_function {
 
     jz_gpio_bulk_free(i2c_pins, ARRAY_SIZE(i2c_pins));
 
-
 */
+
 struct jz_gpio_bulk_request {
 	int gpio;
 	const char *name;
-- 
1.7.6


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

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

* Re: [PATCH 2/7] MIPS: static should be at beginning of declaration
  2011-07-09 21:12 ` [PATCH 2/7] MIPS: static should be at beginning of declaration Jesper Juhl
@ 2011-08-02  9:24   ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2011-08-02  9:24 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel, trivial, Lars-Peter Clausen, linux-mips

On Sat, Jul 09, 2011 at 11:12:35PM +0200, Jesper Juhl wrote:

> Make sure that the 'static' keywork is at the beginning of declaration
> for arch/mips/include/asm/mach-jz4740/gpio.h
> 
> This gets rid of warnings like
>   warning: ‘static’ is not at beginning of declaration
> when building with -Wold-style-declaration (and/or -Wextra which also
> enables it).
> Also a few tiny whitespace changes.

> - const static struct jz_gpio_bulk_request i2c_pins[] = {
> + static const struct jz_gpio_bulk_request i2c_pins[] = {

Quite surprising - but that still was valid C - just type for example:

int typedef (*func(const char op))(int a, int b[static const a = 3]);

  Ralf

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

end of thread, other threads:[~2011-08-02  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.LNX.2.00.1107092304160.25516@swampdragon.chaosbits.net>
2011-07-09 21:12 ` [PATCH 2/7] MIPS: static should be at beginning of declaration Jesper Juhl
2011-08-02  9:24   ` Ralf Baechle

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