public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix longstanding "error: storage size of '__mod_dmi_device_table' isn't known"
@ 2009-01-21 22:58 Alexey Dobriyan
  2009-01-27 23:57 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2009-01-21 22:58 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, linux-kernel, dwmw2

gcc 3.4.6 doesn't like MODULE_DEVICE_TABLE(dmi, x) expansion enough to error out.
Shut it up in a most simple way.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/mod_devicetable.h |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -443,6 +443,13 @@ struct dmi_system_id {
 	struct dmi_strmatch matches[4];
 	void *driver_data;
 };
+/*
+ * struct dmi_device_id appears during expansion of
+ * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
+ * but this is enough for gcc 3.4.6 to error out:
+ *	error: storage size of '__mod_dmi_device_table' isn't known
+ */
+#define dmi_device_id dmi_system_id
 #endif
 
 #define DMI_MATCH(a, b)	{ a, b }

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

* Re: [PATCH] Fix longstanding "error: storage size of '__mod_dmi_device_table' isn't known"
  2009-01-21 22:58 [PATCH] Fix longstanding "error: storage size of '__mod_dmi_device_table' isn't known" Alexey Dobriyan
@ 2009-01-27 23:57 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2009-01-27 23:57 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: torvalds, linux-kernel, dwmw2

On Thu, 22 Jan 2009 01:58:36 +0300
Alexey Dobriyan <adobriyan@gmail.com> wrote:

> gcc 3.4.6 doesn't like MODULE_DEVICE_TABLE(dmi, x) expansion enough to error out.
> Shut it up in a most simple way.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  include/linux/mod_devicetable.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -443,6 +443,13 @@ struct dmi_system_id {
>  	struct dmi_strmatch matches[4];
>  	void *driver_data;
>  };
> +/*
> + * struct dmi_device_id appears during expansion of
> + * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
> + * but this is enough for gcc 3.4.6 to error out:
> + *	error: storage size of '__mod_dmi_device_table' isn't known
> + */
> +#define dmi_device_id dmi_system_id
>  #endif
>  
>  #define DMI_MATCH(a, b)	{ a, b }

I don't get it.

If code has

MODULE_DEVICE_TABLE(dmi, x);

and correctly includes mod_devicetable.h then that code will be
expanded and compiled happily by all compiler versions?  Or not?


Under what circumstances does it fail?  Presumably if some header files
weren't included?  If so, why is that specific to a gcc version?


Or something else.  I have no idea.  Sigh.  New changelog, please.

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

end of thread, other threads:[~2009-01-27 23:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 22:58 [PATCH] Fix longstanding "error: storage size of '__mod_dmi_device_table' isn't known" Alexey Dobriyan
2009-01-27 23:57 ` Andrew Morton

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