From: Darren Hart <dvhart@infradead.org>
To: "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: arch/x86: sfi: intel_scu_devices_create() section mismatch warnings
Date: Fri, 18 Dec 2015 13:11:24 -0800 [thread overview]
Message-ID: <20151218211124.GC15346@malice.jf.intel.com> (raw)
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
reply other threads:[~2015-12-18 21:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20151218211124.GC15346@malice.jf.intel.com \
--to=dvhart@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=tglx@linutronix.de \
/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 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.