Bug 12483

Summary: Reference to inexistent struct dmi_device_id breaks the build
Product: Platform Specific/Hardware Reporter: Jean Delvare (jdelvare)
Component: i386Assignee: Henrik Rydberg (rydberg)
Status: CLOSED CODE_FIX    
Severity: high CC: adobriyan, akpm, dwmw2, rydberg
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.28 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 11808    

Description Jean Delvare 2009-01-19 01:29:50 UTC
Latest working kernel version: 2.6.27.10
Earliest failing kernel version: 2.6.28
Distribution: Slackware 11.0
Hardware Environment: i386
Software Environment: gcc 3.4.6, GNU ld 2.15.92.0.2
Problem Description:

Kernel build fails with either of the following errors:
drivers/hwmon/applesmc.c:1582: error: storage size of '__mod_dmi_device_table' isn't known
drivers/video/backlight/mbp_nvidia_bl.c:114: error: storage size of '__mod_dmi_device_table' isn't known

This is because MODULE_DEVICE_TABLE(dmi, ...) expands to:
extern const struct dmi_device_id __mod_dmi_device_table ...
and struct dmi_device_id doesn't exist.

Steps to reproduce:
Build kernel 2.6.28 or 2.6.29-rc2 on x86 with gcc 3.

Apparently the problem doesn't happen with gcc 4.

This problem has already been discussed:
http://lkml.org/lkml/2008/12/11/441
https://kerneltrap.org/mailarchive/linux-kernel/2008/11/14/4156904/thread
But a patch still has to be submitted to mainline and then ported to 2.6.28-stable.
Comment 1 Henrik Rydberg 2009-01-27 10:52:37 UTC
Patch sent: http://lkml.org/lkml/2009/1/27/271
Comment 2 Jean Delvare 2009-01-27 11:47:33 UTC
Great, thanks!