From: Greg KH <gregkh@linuxfoundation.org>
To: behanw@converseincode.com
Cc: dh.herrmann@gmail.com, sameo@linux.intel.com,
jani.nikula@intel.com, alexandre.bounine@idt.com,
akpm@linux-foundation.org, dmitry.torokhov@gmail.com,
tomas.winkler@intel.com, arnd@arndb.de,
linux-kernel@vger.kernel.org, dwmw2@infradead.org,
pageexec@freemail.hu, "Jan-Simon Möller" <dl9pf@gmx.de>
Subject: Re: [PATCH] x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id"
Date: Sat, 22 Mar 2014 09:28:08 -0700 [thread overview]
Message-ID: <20140322162808.GF13385@kroah.com> (raw)
In-Reply-To: <1395470418-16015-1-git-send-email-behanw@converseincode.com>
On Fri, Mar 21, 2014 at 11:40:18PM -0700, behanw@converseincode.com wrote:
> From: Behan Webster <behanw@converseincode.com>
>
> Similar to the fix in 40413dcb7b273bda681dca38e6ff0bbb3728ef11
>
> MODULE_DEVICE_TABLE(x86cpu, ...) expects the struct to be called struct
> x86cpu_device_id, and not struct x86_cpu_id which is what is used in the rest
> of the kernel code. Although gcc seems to ignore this error, clang fails
> without this define to fix the name.
>
> Code from drivers/thermal/x86_pkg_temp_thermal.c
> static const struct x86_cpu_id __initconst pkg_temp_thermal_ids[] = { ... };
> MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);
>
> Error from clang:
> drivers/thermal/x86_pkg_temp_thermal.c:577:1: error: variable has
> incomplete type 'const struct x86cpu_device_id'
> MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);
> ^
> include/linux/module.h:145:3: note: expanded from macro
> 'MODULE_DEVICE_TABLE'
> MODULE_GENERIC_TABLE(type##_device, name)
> ^
> include/linux/module.h:87:32: note: expanded from macro
> 'MODULE_GENERIC_TABLE'
> extern const struct gtype##_id __mod_##gtype##_table \
> ^
> <scratch space>:143:1: note: expanded from here
> __mod_x86cpu_device_table
> ^
> drivers/thermal/x86_pkg_temp_thermal.c:577:1: note: forward declaration of
> 'struct x86cpu_device_id'
> include/linux/module.h:145:3: note: expanded from macro
> 'MODULE_DEVICE_TABLE'
> MODULE_GENERIC_TABLE(type##_device, name)
> ^
> include/linux/module.h:87:21: note: expanded from macro
> 'MODULE_GENERIC_TABLE'
> extern const struct gtype##_id __mod_##gtype##_table \
> ^
> <scratch space>:141:1: note: expanded from here
> x86cpu_device_id
> ^
> 1 error generated.
>
> Signed-off-by: Behan Webster <behanw@converseincode.com>
> Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
prev parent reply other threads:[~2014-03-22 16:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-22 6:40 behanw
2014-03-22 16:28 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140322162808.GF13385@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=alexandre.bounine@idt.com \
--cc=arnd@arndb.de \
--cc=behanw@converseincode.com \
--cc=dh.herrmann@gmail.com \
--cc=dl9pf@gmx.de \
--cc=dmitry.torokhov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jani.nikula@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pageexec@freemail.hu \
--cc=sameo@linux.intel.com \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome