public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] More missing includes [1/4]
@ 2002-11-18 22:16 Geert Uytterhoeven
  2002-11-18 23:17 ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2002-11-18 22:16 UTC (permalink / raw)
  To: Linux Kernel Development


Add missing #include <linux/init.h>

--- linux-2.5.48/drivers/scsi/scsi.h	Mon Nov 18 10:03:40 2002
+++ linux-m68k-2.5.48/drivers/scsi/scsi.h	Mon Nov 18 14:18:21 2002
@@ -18,6 +18,7 @@
 #include <linux/config.h>	/* for CONFIG_SCSI_LOGGING */
 #include <linux/devfs_fs_kernel.h>
 #include <linux/proc_fs.h>
+#include <linux/init.h>
 
 /*
  * Some of the public constants are being moved to this file.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


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

* Re: [PATCH] More missing includes [1/4]
  2002-11-18 22:16 [PATCH] More missing includes [1/4] Geert Uytterhoeven
@ 2002-11-18 23:17 ` Russell King
  2002-11-19  0:19   ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King @ 2002-11-18 23:17 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux Kernel Development

On Mon, Nov 18, 2002 at 11:16:04PM +0100, Geert Uytterhoeven wrote:
> 
> Add missing #include <linux/init.h>
> 
> --- linux-2.5.48/drivers/scsi/scsi.h	Mon Nov 18 10:03:40 2002
> +++ linux-m68k-2.5.48/drivers/scsi/scsi.h	Mon Nov 18 14:18:21 2002
> @@ -18,6 +18,7 @@
>  #include <linux/config.h>	/* for CONFIG_SCSI_LOGGING */
>  #include <linux/devfs_fs_kernel.h>
>  #include <linux/proc_fs.h>
> +#include <linux/init.h>
>  
>  /*
>   * Some of the public constants are being moved to this file.
> 

The more obvious solution is to remove the __initdata from the
declaration on line 545.  Such usage of __initdata (and __init)
serves no purpose.

--- orig/drivers/scsi/scsi.h	Mon Nov 18 09:52:15 2002
+++ linux/drivers/scsi/scsi.h	Mon Nov 18 15:25:42 2002
@@ -542,7 +542,7 @@
 	unsigned flags;
 };
 
-extern struct dev_info scsi_static_device_list[] __initdata;
+extern struct dev_info scsi_static_device_list[];
 
 /*
  * scsi_dev_info_list: structure to hold black/white listed devices.


-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


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

* Re: [PATCH] More missing includes [1/4]
  2002-11-18 23:17 ` Russell King
@ 2002-11-19  0:19   ` Richard Henderson
  2002-11-19  0:23     ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2002-11-19  0:19 UTC (permalink / raw)
  To: Geert Uytterhoeven, Linux Kernel Development

On Mon, Nov 18, 2002 at 11:17:45PM +0000, Russell King wrote:
> The more obvious solution is to remove the __initdata from the
> declaration on line 545.  Such usage of __initdata (and __init)
> serves no purpose.

Yes it does.  If the variable is small, then the compiler may
expect the variable to be placed in the .sdata section, and so
be reachable by, say, a 16-bit gp-relative relocation.

Now, this variable in particular may not be small enough for
that, but the fact remains that the general rule should be that
variables should be declared with their section attributes.


r~

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

* Re: [PATCH] More missing includes [1/4]
  2002-11-19  0:19   ` Richard Henderson
@ 2002-11-19  0:23     ` Russell King
  0 siblings, 0 replies; 4+ messages in thread
From: Russell King @ 2002-11-19  0:23 UTC (permalink / raw)
  To: Geert Uytterhoeven, Linux Kernel Development

On Mon, Nov 18, 2002 at 04:19:47PM -0800, Richard Henderson wrote:
> On Mon, Nov 18, 2002 at 11:17:45PM +0000, Russell King wrote:
> > The more obvious solution is to remove the __initdata from the
> > declaration on line 545.  Such usage of __initdata (and __init)
> > serves no purpose.
> 
> Yes it does.  If the variable is small, then the compiler may
> expect the variable to be placed in the .sdata section, and so
> be reachable by, say, a 16-bit gp-relative relocation.
> 
> Now, this variable in particular may not be small enough for
> that, but the fact remains that the general rule should be that
> variables should be declared with their section attributes.

Sigh, which is contary to what Christoph told me.  Fine, have it your
own way.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


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

end of thread, other threads:[~2002-11-19  0:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-18 22:16 [PATCH] More missing includes [1/4] Geert Uytterhoeven
2002-11-18 23:17 ` Russell King
2002-11-19  0:19   ` Richard Henderson
2002-11-19  0:23     ` Russell King

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