src/include: Move storage class to beginning of declaration

Fix the following warning detected by checkpatch.pl:

WARNING: storage class should be at the beginning of the declaration

The following storage class attribute is not detected by checkpatch.py:

	static cbmem_init_hook_t init_fn_ ## _ptr_ __attribute__((used,
\
	section(".rodata.cbmem_init_hooks"))) = init_fn_;

The following lines generates a false positive:

(pound)define STATIC static
src/include/cpu/amd/common/cbtypes.h:60: WARNING: storage class should
be at the beginning of the declaration

typedef asmlinkage void (*smm_handler_t)(void *);
src/include/cpu/x86/smm.h:514: WARNING: storage class should be at the
beginning of the declaration

(pound)define MAYBE_STATIC static
src/include/stddef.h:34: WARNING: storage class should be at the
beginning of the declaration

TEST=Build and run on Galileo Gen2

Change-Id: Ie087d38e6171b549b90e0b831050ac44746a1e14
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18657
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
diff --git a/src/include/bootblock_common.h b/src/include/bootblock_common.h
index 04fc0cb..6ede77c 100644
--- a/src/include/bootblock_common.h
+++ b/src/include/bootblock_common.h
@@ -33,7 +33,7 @@
 /*
  * C code entry point for the boot block.
  */
-void asmlinkage bootblock_c_entry(uint64_t base_timestamp);
+asmlinkage void bootblock_c_entry(uint64_t base_timestamp);
 
 /*
  * This is a the same as the bootblock main(), with the difference that it does
@@ -43,6 +43,6 @@
  * This function assumes that the timer has already been initialized, so it
  * does not call init_timer().
  */
-void asmlinkage bootblock_main_with_timestamp(uint64_t base_timestamp);
+asmlinkage void bootblock_main_with_timestamp(uint64_t base_timestamp);
 
 #endif	/* __BOOTBLOCK_COMMON_H */
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 71e44d3..0fe25c1 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -112,36 +112,36 @@
 void cbmem_add_records_to_cbtable(struct lb_header *header);
 
 #if ENV_RAMSTAGE
-#define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused_ __attribute__((unused)) = init_fn_;
+#define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused_ = init_fn_;
 #define RAMSTAGE_CBMEM_INIT_HOOK(init_fn_) \
 	static cbmem_init_hook_t init_fn_ ## _ptr_ __attribute__((used, \
 	section(".rodata.cbmem_init_hooks"))) = init_fn_;
-#define POSTCAR_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused2_ __attribute__((unused)) = init_fn_;
+#define POSTCAR_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused2_ = init_fn_;
 #elif ENV_ROMSTAGE
 #define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) \
 	static cbmem_init_hook_t init_fn_ ## _ptr_ __attribute__((used, \
 	section(".rodata.cbmem_init_hooks"))) = init_fn_;
-#define RAMSTAGE_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused_ __attribute__((unused)) = init_fn_;
-#define POSTCAR_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused2_ __attribute__((unused)) = init_fn_;
+#define RAMSTAGE_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused_ = init_fn_;
+#define POSTCAR_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused2_ = init_fn_;
 #elif ENV_POSTCAR
-#define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused2_ __attribute__((unused)) = init_fn_;
-#define RAMSTAGE_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused_ __attribute__((unused)) = init_fn_;
+#define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused2_ = init_fn_;
+#define RAMSTAGE_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused_ = init_fn_;
 #define POSTCAR_CBMEM_INIT_HOOK(init_fn_) \
 	static cbmem_init_hook_t init_fn_ ## _ptr_ __attribute__((used, \
 	section(".rodata.cbmem_init_hooks"))) = init_fn_;
 #else
-#define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused_ __attribute__((unused)) = init_fn_;
-#define RAMSTAGE_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused2_ __attribute__((unused)) = init_fn_;
-#define POSTCAR_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \
-	init_fn_ ## _unused3_ __attribute__((unused)) = init_fn_;
+#define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused_ = init_fn_;
+#define RAMSTAGE_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused2_ = init_fn_;
+#define POSTCAR_CBMEM_INIT_HOOK(init_fn_) __attribute__((unused)) \
+	static cbmem_init_hook_t init_fn_ ## _unused3_ = init_fn_;
 #endif /* ENV_RAMSTAGE */
 
 
diff --git a/src/include/cpu/cpu.h b/src/include/cpu/cpu.h
index d546854..a78dd2f 100644
--- a/src/include/cpu/cpu.h
+++ b/src/include/cpu/cpu.h
@@ -7,7 +7,7 @@
 void cpu_initialize(unsigned int cpu_index);
 struct bus;
 void initialize_cpus(struct bus *cpu_bus);
-void asmlinkage secondary_cpu_init(unsigned int cpu_index);
+asmlinkage void secondary_cpu_init(unsigned int cpu_index);
 int cpu_phys_address_size(void);
 
 #define __cpu_driver __attribute__ ((used, __section__(".rodata.cpu_driver")))
diff --git a/src/include/cpu/intel/romstage.h b/src/include/cpu/intel/romstage.h
index 0dd02ce..3a9e989 100644
--- a/src/include/cpu/intel/romstage.h
+++ b/src/include/cpu/intel/romstage.h
@@ -27,6 +27,6 @@
 asmlinkage void *romstage_main(unsigned long bist);
 /* romstage_after_car() is the C function called after cache-as-ram has
  * been torn down. It is responsible for loading the ramstage. */
-void asmlinkage romstage_after_car(void);
+asmlinkage void romstage_after_car(void);
 
 #endif /* _CPU_INTEL_ROMSTAGE_H */
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index f07cac3..48c4c0b 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -517,7 +517,7 @@
 /* SMM Runtime helpers. */
 
 /* Entry point for SMM modules. */
-void asmlinkage smm_handler_start(void *params);
+asmlinkage void smm_handler_start(void *params);
 
 /* Retrieve SMM save state for a given CPU. WARNING: This does not take into
  * account CPUs which are configured to not save their state to RAM. */
diff --git a/src/include/thread.h b/src/include/thread.h
index d200635..586fb3a 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -65,7 +65,7 @@
 }
 
 /* Architecture specific thread functions. */
-void asmlinkage switch_to_thread(uintptr_t new_stack, uintptr_t *saved_stack);
+asmlinkage void switch_to_thread(uintptr_t new_stack, uintptr_t *saved_stack);
 /* Set up the stack frame for a new thread so that a switch_to_thread() call
  * will enter the thread_entry() function with arg as a parameter. The
  * saved_stack field in the struct thread needs to be updated accordingly. */