public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] m68knommu: Mark functions only called from setup_arch() __init
@ 2013-06-30  9:58 Geert Uytterhoeven
  2013-07-15  1:22 ` Greg Ungerer
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2013-06-30  9:58 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: uclinux-dev, linux-m68k, linux-kernel, Geert Uytterhoeven

Some functions that are only called (indirectly) from setup_arch() lack
__init annotations.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
This is sort of a v2 of "m68knommu: Mark config_BSP() __init", adding
parse_uboot_commandline(), init_hardware(), m360_cpm_reset()

 arch/m68k/kernel/setup_no.c         |    2 +-
 arch/m68k/platform/68000/m68328.c   |    3 ++-
 arch/m68k/platform/68000/m68EZ328.c |    3 ++-
 arch/m68k/platform/68000/m68VZ328.c |    9 +++++----
 arch/m68k/platform/68360/commproc.c |    3 ++-
 arch/m68k/platform/68360/config.c   |    3 ++-
 6 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
index 911ba47..5b16f5d 100644
--- a/arch/m68k/kernel/setup_no.c
+++ b/arch/m68k/kernel/setup_no.c
@@ -118,7 +118,7 @@ void (*mach_power_off)(void);
  *
  * Returns:
  */
-void parse_uboot_commandline(char *commandp, int size)
+static void __init parse_uboot_commandline(char *commandp, int size)
 {
 	extern unsigned long _init_sp;
 	unsigned long *sp;
diff --git a/arch/m68k/platform/68000/m68328.c b/arch/m68k/platform/68000/m68328.c
index a86eb66..e53caf4 100644
--- a/arch/m68k/platform/68000/m68328.c
+++ b/arch/m68k/platform/68000/m68328.c
@@ -15,6 +15,7 @@
 
 /***************************************************************************/
 
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/rtc.h>
@@ -42,7 +43,7 @@ void m68328_reset (void)
 
 /***************************************************************************/
 
-void config_BSP(char *command, int len)
+void __init config_BSP(char *command, int len)
 {
   printk(KERN_INFO "\n68328 support D. Jeff Dionne <jeff@uclinux.org>\n");
   printk(KERN_INFO "68328 support Kenneth Albanowski <kjahds@kjshds.com>\n");
diff --git a/arch/m68k/platform/68000/m68EZ328.c b/arch/m68k/platform/68000/m68EZ328.c
index a6eb72d..332b5e8 100644
--- a/arch/m68k/platform/68000/m68EZ328.c
+++ b/arch/m68k/platform/68000/m68EZ328.c
@@ -13,6 +13,7 @@
 
 /***************************************************************************/
 
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/rtc.h>
@@ -52,7 +53,7 @@ _bsc1(unsigned char *, gethwaddr, int, a)
 _bsc1(char *, getbenv, char *, a)
 #endif
 
-void config_BSP(char *command, int len)
+void __init config_BSP(char *command, int len)
 {
   unsigned char *p;
 
diff --git a/arch/m68k/platform/68000/m68VZ328.c b/arch/m68k/platform/68000/m68VZ328.c
index eb6964f..fd66583 100644
--- a/arch/m68k/platform/68000/m68VZ328.c
+++ b/arch/m68k/platform/68000/m68VZ328.c
@@ -14,6 +14,7 @@
 
 /***************************************************************************/
 
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/kd.h>
@@ -59,7 +60,7 @@ static void m68vz328_reset(void)
 	);
 }
 
-static void init_hardware(char *command, int size)
+static void __init init_hardware(char *command, int size)
 {
 #ifdef CONFIG_DIRECT_IO_ACCESS
 	SCR = 0x10;					/* allow user access to internal registers */
@@ -145,7 +146,7 @@ _bsc0(char *, getserialnum)
 _bsc1(unsigned char *, gethwaddr, int, a)
 _bsc1(char *, getbenv, char *, a)
 
-static void init_hardware(char *command, int size)
+static void __init init_hardware(char *command, int size)
 {
 	char *p;
 
@@ -167,7 +168,7 @@ static void m68vz328_reset(void)
 {
 }
 
-static void init_hardware(char *command, int size)
+static void __init init_hardware(char *command, int size)
 {
 }
 
@@ -175,7 +176,7 @@ static void init_hardware(char *command, int size)
 #endif
 /***************************************************************************/
 
-void config_BSP(char *command, int size)
+void __init config_BSP(char *command, int size)
 {
 	printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
 
diff --git a/arch/m68k/platform/68360/commproc.c b/arch/m68k/platform/68360/commproc.c
index 8e4e10c..315727b 100644
--- a/arch/m68k/platform/68360/commproc.c
+++ b/arch/m68k/platform/68360/commproc.c
@@ -31,6 +31,7 @@
  */
 
 #include <linux/errno.h>
+#include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/param.h>
@@ -77,7 +78,7 @@ void m360_cpm_reset(void);
 
 
 
-void m360_cpm_reset()
+void __init m360_cpm_reset()
 {
 /* 	pte_t		   *pte; */
 
diff --git a/arch/m68k/platform/68360/config.c b/arch/m68k/platform/68360/config.c
index 9877cef..0570741 100644
--- a/arch/m68k/platform/68360/config.c
+++ b/arch/m68k/platform/68360/config.c
@@ -11,6 +11,7 @@
  */
 
 #include <stdarg.h>
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -140,7 +141,7 @@ _bsc1(char *, getbenv, char *, a)
 #endif
 
 
-void config_BSP(char *command, int len)
+void __init config_BSP(char *command, int len)
 {
   unsigned char *p;
 
-- 
1.7.9.5


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

* Re: [PATCH] m68knommu: Mark functions only called from setup_arch() __init
  2013-06-30  9:58 [PATCH] m68knommu: Mark functions only called from setup_arch() __init Geert Uytterhoeven
@ 2013-07-15  1:22 ` Greg Ungerer
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Ungerer @ 2013-07-15  1:22 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: uclinux-dev, linux-m68k, linux-kernel

Hi Geert,

On 30/06/13 19:58, Geert Uytterhoeven wrote:
> Some functions that are only called (indirectly) from setup_arch() lack
> __init annotations.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Thanks. Applied to m68knommu git tree.

Regards
Greg


> ---
> This is sort of a v2 of "m68knommu: Mark config_BSP() __init", adding
> parse_uboot_commandline(), init_hardware(), m360_cpm_reset()
> 
>  arch/m68k/kernel/setup_no.c         |    2 +-
>  arch/m68k/platform/68000/m68328.c   |    3 ++-
>  arch/m68k/platform/68000/m68EZ328.c |    3 ++-
>  arch/m68k/platform/68000/m68VZ328.c |    9 +++++----
>  arch/m68k/platform/68360/commproc.c |    3 ++-
>  arch/m68k/platform/68360/config.c   |    3 ++-
>  6 files changed, 14 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
> index 911ba47..5b16f5d 100644
> --- a/arch/m68k/kernel/setup_no.c
> +++ b/arch/m68k/kernel/setup_no.c
> @@ -118,7 +118,7 @@ void (*mach_power_off)(void);
>   *
>   * Returns:
>   */
> -void parse_uboot_commandline(char *commandp, int size)
> +static void __init parse_uboot_commandline(char *commandp, int size)
>  {
>  	extern unsigned long _init_sp;
>  	unsigned long *sp;
> diff --git a/arch/m68k/platform/68000/m68328.c b/arch/m68k/platform/68000/m68328.c
> index a86eb66..e53caf4 100644
> --- a/arch/m68k/platform/68000/m68328.c
> +++ b/arch/m68k/platform/68000/m68328.c
> @@ -15,6 +15,7 @@
>  
>  /***************************************************************************/
>  
> +#include <linux/init.h>
>  #include <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/rtc.h>
> @@ -42,7 +43,7 @@ void m68328_reset (void)
>  
>  /***************************************************************************/
>  
> -void config_BSP(char *command, int len)
> +void __init config_BSP(char *command, int len)
>  {
>    printk(KERN_INFO "\n68328 support D. Jeff Dionne <jeff@uclinux.org>\n");
>    printk(KERN_INFO "68328 support Kenneth Albanowski <kjahds@kjshds.com>\n");
> diff --git a/arch/m68k/platform/68000/m68EZ328.c b/arch/m68k/platform/68000/m68EZ328.c
> index a6eb72d..332b5e8 100644
> --- a/arch/m68k/platform/68000/m68EZ328.c
> +++ b/arch/m68k/platform/68000/m68EZ328.c
> @@ -13,6 +13,7 @@
>  
>  /***************************************************************************/
>  
> +#include <linux/init.h>
>  #include <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/rtc.h>
> @@ -52,7 +53,7 @@ _bsc1(unsigned char *, gethwaddr, int, a)
>  _bsc1(char *, getbenv, char *, a)
>  #endif
>  
> -void config_BSP(char *command, int len)
> +void __init config_BSP(char *command, int len)
>  {
>    unsigned char *p;
>  
> diff --git a/arch/m68k/platform/68000/m68VZ328.c b/arch/m68k/platform/68000/m68VZ328.c
> index eb6964f..fd66583 100644
> --- a/arch/m68k/platform/68000/m68VZ328.c
> +++ b/arch/m68k/platform/68000/m68VZ328.c
> @@ -14,6 +14,7 @@
>  
>  /***************************************************************************/
>  
> +#include <linux/init.h>
>  #include <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/kd.h>
> @@ -59,7 +60,7 @@ static void m68vz328_reset(void)
>  	);
>  }
>  
> -static void init_hardware(char *command, int size)
> +static void __init init_hardware(char *command, int size)
>  {
>  #ifdef CONFIG_DIRECT_IO_ACCESS
>  	SCR = 0x10;					/* allow user access to internal registers */
> @@ -145,7 +146,7 @@ _bsc0(char *, getserialnum)
>  _bsc1(unsigned char *, gethwaddr, int, a)
>  _bsc1(char *, getbenv, char *, a)
>  
> -static void init_hardware(char *command, int size)
> +static void __init init_hardware(char *command, int size)
>  {
>  	char *p;
>  
> @@ -167,7 +168,7 @@ static void m68vz328_reset(void)
>  {
>  }
>  
> -static void init_hardware(char *command, int size)
> +static void __init init_hardware(char *command, int size)
>  {
>  }
>  
> @@ -175,7 +176,7 @@ static void init_hardware(char *command, int size)
>  #endif
>  /***************************************************************************/
>  
> -void config_BSP(char *command, int size)
> +void __init config_BSP(char *command, int size)
>  {
>  	printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
>  
> diff --git a/arch/m68k/platform/68360/commproc.c b/arch/m68k/platform/68360/commproc.c
> index 8e4e10c..315727b 100644
> --- a/arch/m68k/platform/68360/commproc.c
> +++ b/arch/m68k/platform/68360/commproc.c
> @@ -31,6 +31,7 @@
>   */
>  
>  #include <linux/errno.h>
> +#include <linux/init.h>
>  #include <linux/sched.h>
>  #include <linux/kernel.h>
>  #include <linux/param.h>
> @@ -77,7 +78,7 @@ void m360_cpm_reset(void);
>  
>  
>  
> -void m360_cpm_reset()
> +void __init m360_cpm_reset()
>  {
>  /* 	pte_t		   *pte; */
>  
> diff --git a/arch/m68k/platform/68360/config.c b/arch/m68k/platform/68360/config.c
> index 9877cef..0570741 100644
> --- a/arch/m68k/platform/68360/config.c
> +++ b/arch/m68k/platform/68360/config.c
> @@ -11,6 +11,7 @@
>   */
>  
>  #include <stdarg.h>
> +#include <linux/init.h>
>  #include <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/mm.h>
> @@ -140,7 +141,7 @@ _bsc1(char *, getbenv, char *, a)
>  #endif
>  
>  
> -void config_BSP(char *command, int len)
> +void __init config_BSP(char *command, int len)
>  {
>    unsigned char *p;
>  
> 


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

end of thread, other threads:[~2013-07-15  1:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30  9:58 [PATCH] m68knommu: Mark functions only called from setup_arch() __init Geert Uytterhoeven
2013-07-15  1:22 ` Greg Ungerer

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