Skip to contentSkip to conversation

sh: Storage class should be before const qualifier

PATCH Applied Tobias Klauser 2 participants 4 messages Feb 17, 2008 – Feb 12, 2009

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

PATCH 1/1 sh: Storage class should be before const qualifier

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature.

---
 arch/sh/kernel/cpu/sh2a/clock-sh7203.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/sh/kernel/cpu/sh2a/clock-sh7203.c +2 -2
index 3feb95a..fb78132 100644
@@ -21,8 +21,8 @@
 #include <asm/freq.h>
 #include <asm/io.h>
 
-const static int pll1rate[]={8,12,16,0};
-const static int pfc_divisors[]={1,2,3,4,6,8,12};
+static const int pll1rate[]={8,12,16,0};
+static const int pfc_divisors[]={1,2,3,4,6,8,12};
 #define ifc_divisors pfc_divisors
 
 #if (CONFIG_SH_CLK_MD = 0)
Signature · 1 line
1.5.4.1
Applied
#1 lore raw
Quoted 7 lines · Tobias Klauser

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature.

Applied, thanks.

#2 lore raw

PATCH 1/1 sh: Storage class should be before const qualifier

In reply to Tobias Klauser

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature.

---
 arch/sh/kernel/cpu/sh2a/clock-sh7201.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/sh/kernel/cpu/sh2a/clock-sh7201.c +2 -2
index 020a96f..4a5e597 100644
@@ -18,8 +18,8 @@
 #include <asm/freq.h>
 #include <asm/io.h>
 
-const static int pll1rate[]={1,2,3,4,6,8};
-const static int pfc_divisors[]={1,2,3,4,6,8,12};
+static const int pll1rate[]={1,2,3,4,6,8};
+static const int pfc_divisors[]={1,2,3,4,6,8,12};
 #define ifc_divisors pfc_divisors
 
 #if (CONFIG_SH_CLK_MD = 0)
Signature · 1 line
1.5.6.5