Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

authored by

Tobias Klauser and committed by
Adrian Bunk
c5a69d57 0bbfb7c2

+28 -28
+2 -2
arch/mips/kernel/machine_kexec.c
··· 13 13 #include <asm/cacheflush.h> 14 14 #include <asm/page.h> 15 15 16 - const extern unsigned char relocate_new_kernel[]; 17 - const extern unsigned int relocate_new_kernel_size; 16 + extern const unsigned char relocate_new_kernel[]; 17 + extern const unsigned int relocate_new_kernel_size; 18 18 19 19 extern unsigned long kexec_start_address; 20 20 extern unsigned long kexec_indirection_page;
+1 -1
arch/powerpc/kernel/rtas.c
··· 182 182 char *os; 183 183 static int display_character, set_indicator; 184 184 static int display_width, display_lines, form_feed; 185 - const static int *row_width; 185 + static const int *row_width; 186 186 static DEFINE_SPINLOCK(progress_lock); 187 187 static int current_line; 188 188 static int pending_newline = 0; /* did last write end with unprinted newline? */
+2 -2
arch/sh/kernel/cpu/sh2/clock-sh7619.c
··· 18 18 #include <asm/freq.h> 19 19 #include <asm/io.h> 20 20 21 - const static int pll1rate[]={1,2}; 22 - const static int pfc_divisors[]={1,2,0,4}; 21 + static const int pll1rate[] = {1,2}; 22 + static const int pfc_divisors[] = {1,2,0,4}; 23 23 24 24 #if (CONFIG_SH_CLK_MD == 1) || (CONFIG_SH_CLK_MD == 2) 25 25 #define PLL2 (4)
+2 -2
arch/sh/kernel/cpu/sh2a/clock-sh7206.c
··· 18 18 #include <asm/freq.h> 19 19 #include <asm/io.h> 20 20 21 - const static int pll1rate[]={1,2,3,4,6,8}; 22 - const static int pfc_divisors[]={1,2,3,4,6,8,12}; 21 + static const int pll1rate[]={1,2,3,4,6,8}; 22 + static const int pfc_divisors[]={1,2,3,4,6,8,12}; 23 23 #define ifc_divisors pfc_divisors 24 24 25 25 #if (CONFIG_SH_CLK_MD == 2)
+1 -1
drivers/ieee1394/ohci1394.c
··· 180 180 static void ohci1394_pci_remove(struct pci_dev *pdev); 181 181 182 182 #ifndef __LITTLE_ENDIAN 183 - const static size_t hdr_sizes[] = { 183 + static const size_t hdr_sizes[] = { 184 184 3, /* TCODE_WRITEQ */ 185 185 4, /* TCODE_WRITEB */ 186 186 3, /* TCODE_WRITE_RESPONSE */
+1 -1
drivers/input/serio/libps2.c
··· 97 97 98 98 int ps2_is_keyboard_id(char id_byte) 99 99 { 100 - const static char keyboard_ids[] = { 100 + static const char keyboard_ids[] = { 101 101 0xab, /* Regular keyboards */ 102 102 0xac, /* NCD Sun keyboard */ 103 103 0x2b, /* Trust keyboard, translated */
+1 -1
drivers/media/video/pvrusb2/pvrusb2-audio.c
··· 158 158 } 159 159 160 160 161 - const static struct pvr2_i2c_handler_functions msp3400_funcs = { 161 + static const struct pvr2_i2c_handler_functions msp3400_funcs = { 162 162 .detach = (void (*)(void *))pvr2_msp3400_detach, 163 163 .check = (int (*)(void *))msp3400_check, 164 164 .update = (void (*)(void *))msp3400_update,
+1 -1
drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
··· 226 226 } 227 227 228 228 229 - const static struct pvr2_i2c_handler_functions hfuncs = { 229 + static const struct pvr2_i2c_handler_functions hfuncs = { 230 230 .detach = (void (*)(void *))decoder_detach, 231 231 .check = (int (*)(void *))decoder_check, 232 232 .update = (void (*)(void *))decoder_update,
+2 -2
drivers/media/video/pvrusb2/pvrusb2-std.c
··· 78 78 #define CSTD_ALL (CSTD_PAL|CSTD_NTSC|CSTD_SECAM) 79 79 80 80 /* Mapping of standard bits to color system */ 81 - const static struct std_name std_groups[] = { 81 + static const struct std_name std_groups[] = { 82 82 {"PAL",CSTD_PAL}, 83 83 {"NTSC",CSTD_NTSC}, 84 84 {"SECAM",CSTD_SECAM}, 85 85 }; 86 86 87 87 /* Mapping of standard bits to modulation system */ 88 - const static struct std_name std_items[] = { 88 + static const struct std_name std_items[] = { 89 89 {"B",TSTD_B}, 90 90 {"B1",TSTD_B1}, 91 91 {"D",TSTD_D},
+1 -1
drivers/media/video/pvrusb2/pvrusb2-tuner.c
··· 80 80 } 81 81 82 82 83 - const static struct pvr2_i2c_handler_functions tuner_funcs = { 83 + static const struct pvr2_i2c_handler_functions tuner_funcs = { 84 84 .detach = (void (*)(void *))pvr2_tuner_detach, 85 85 .check = (int (*)(void *))tuner_check, 86 86 .update = (void (*)(void *))tuner_update,
+1 -1
drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
··· 201 201 } 202 202 203 203 204 - const static struct pvr2_i2c_handler_functions hfuncs = { 204 + static const struct pvr2_i2c_handler_functions hfuncs = { 205 205 .detach = (void (*)(void *))decoder_detach, 206 206 .check = (int (*)(void *))decoder_check, 207 207 .update = (void (*)(void *))decoder_update,
+1 -1
drivers/media/video/pvrusb2/pvrusb2-wm8775.c
··· 126 126 } 127 127 128 128 129 - const static struct pvr2_i2c_handler_functions hfuncs = { 129 + static const struct pvr2_i2c_handler_functions hfuncs = { 130 130 .detach = (void (*)(void *))wm8775_detach, 131 131 .check = (int (*)(void *))wm8775_check, 132 132 .update = (void (*)(void *))wm8775_update,
+1 -1
drivers/scsi/arm/eesox.c
··· 196 196 const void __iomem *reg_fas = base + EESOX_FAS216_OFFSET; 197 197 const void __iomem *reg_dmastat = base + EESOX_DMASTAT; 198 198 const void __iomem *reg_dmadata = base + EESOX_DMADATA; 199 - const register unsigned long mask = 0xffff; 199 + register const unsigned long mask = 0xffff; 200 200 201 201 do { 202 202 unsigned int status;
+2 -2
fs/cifs/cifssmb.c
··· 2824 2824 2825 2825 2826 2826 /* security id for everyone */ 2827 - const static struct cifs_sid sid_everyone = 2827 + static const struct cifs_sid sid_everyone = 2828 2828 {1, 1, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0}}; 2829 2829 /* group users */ 2830 - const static struct cifs_sid sid_user = 2830 + static const struct cifs_sid sid_user = 2831 2831 {1, 2 , {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0}}; 2832 2832 2833 2833 /* Convert CIFS ACL to POSIX form */
+3 -3
include/asm-arm/uaccess.h
··· 109 109 110 110 #define get_user(x,p) \ 111 111 ({ \ 112 - const register typeof(*(p)) __user *__p asm("r0") = (p);\ 112 + register const typeof(*(p)) __user *__p asm("r0") = (p);\ 113 113 register unsigned long __r2 asm("r2"); \ 114 114 register int __e asm("r0"); \ 115 115 switch (sizeof(*(__p))) { \ ··· 143 143 144 144 #define put_user(x,p) \ 145 145 ({ \ 146 - const register typeof(*(p)) __r2 asm("r2") = (x); \ 147 - const register typeof(*(p)) __user *__p asm("r0") = (p);\ 146 + register const typeof(*(p)) __r2 asm("r2") = (x); \ 147 + register const typeof(*(p)) __user *__p asm("r0") = (p);\ 148 148 register int __e asm("r0"); \ 149 149 switch (sizeof(*(__p))) { \ 150 150 case 1: \
+5 -5
include/asm-arm26/uaccess.h
··· 74 74 75 75 #define get_user(x,p) \ 76 76 ({ \ 77 - const register typeof(*(p)) *__p asm("r0") = (p); \ 77 + register const typeof(*(p)) *__p asm("r0") = (p); \ 78 78 register typeof(*(p)) __r1 asm("r1"); \ 79 79 register int __e asm("r0"); \ 80 80 switch (sizeof(*(p))) { \ ··· 139 139 140 140 #define put_user(x,p) \ 141 141 ({ \ 142 - const register typeof(*(p)) __r1 asm("r1") = (x); \ 143 - const register typeof(*(p)) *__p asm("r0") = (p); \ 142 + register const typeof(*(p)) __r1 asm("r1") = (x); \ 143 + register const typeof(*(p)) *__p asm("r0") = (p); \ 144 144 register int __e asm("r0"); \ 145 145 switch (sizeof(*(__p))) { \ 146 146 case 1: \ ··· 170 170 171 171 #define put_user(x,p) \ 172 172 ({ \ 173 - const register typeof(*(p)) __r1 asm("r1") = (x); \ 174 - const register typeof(*(p)) *__p asm("r0") = (p); \ 173 + register const typeof(*(p)) __r1 asm("r1") = (x); \ 174 + register const typeof(*(p)) *__p asm("r0") = (p); \ 175 175 register int __e asm("r0"); \ 176 176 switch (sizeof(*(p))) { \ 177 177 case 1: \
+1 -1
include/asm-ia64/kexec.h
··· 23 23 24 24 extern struct kimage *ia64_kimage; 25 25 DECLARE_PER_CPU(u64, ia64_mca_pal_base); 26 - const extern unsigned int relocate_new_kernel_size; 26 + extern const unsigned int relocate_new_kernel_size; 27 27 extern void relocate_new_kernel(unsigned long, unsigned long, 28 28 struct ia64_boot_param *, unsigned long); 29 29 static inline void