* arch/x86: sfi: intel_scu_devices_create() section mismatch warnings
@ 2015-12-18 21:11 Darren Hart
0 siblings, 0 replies; only message in thread
From: Darren Hart @ 2015-12-18 21:11 UTC (permalink / raw)
To: H. Peter Anvin, Thomas Gleixner, Kuppuswamy Sathyanarayanan
Cc: Linux Kernel Mailing List
I noticed the following in my build logs:
WARNING: vmlinux.o(.text+0xa90d8): Section mismatch in reference from the
function intel_scu_devices_create() to the function
.init.text:i2c_register_board_info()
The function intel_scu_devices_create() references
the function __init i2c_register_board_info().
This is often because intel_scu_devices_create lacks a __init
annotation or the annotation of i2c_register_board_info is wrong.
The relevant code in arch/x86/platform/intel-mid/sfi.c:
> /* Called by IPC driver */
> void intel_scu_devices_create(void)
> {
> int i;
>
> for (i = 0; i < ipc_next_dev; i++)
> platform_device_add(ipc_devs[i]);
>
> for (i = 0; i < spi_next_dev; i++)
> spi_register_board_info(spi_devs[i], 1);
>
> for (i = 0; i < i2c_next_dev; i++) {
> struct i2c_adapter *adapter;
> struct i2c_client *client;
>
> adapter = i2c_get_adapter(i2c_bus[i]);
> if (adapter) {
> client = i2c_new_device(adapter, i2c_devs[i]);
> if (!client)
> pr_err("can't create i2c device %s\n",
> i2c_devs[i]->type);
> } else
> i2c_register_board_info(i2c_bus[i], i2c_devs[i], 1);
i2c_register_board_info is annotated as __init and is intended for static
machine board-files.
The correct usage afaict is i2c_new_device() as used above. I presume what we're
doing here is falling back to the static style configuration if this driver
probes before the i2c adapters do?
What I wasn't able to determine quickly is if this is a safe thing to do and the
section mismatch can be ignored or not.
> }
> intel_scu_notifier_post(SCU_AVAILABLE, NULL);
> }
Thanks,
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-12-18 21:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-18 21:11 arch/x86: sfi: intel_scu_devices_create() section mismatch warnings Darren Hart
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.