LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: x86@kernel.org, Feng Tang <feng.tang@intel.com>
Cc: Alan Cox <alan@linux.intel.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] x86/moorestown: change to __devinit in order to suppress warning
Date: Thu, 31 May 2012 23:20:25 +0200
Message-ID: <20120531212025.GA8519@breakpoint.cc> (raw)

The allmodconfig hits:

|WARNING: vmlinux.o(.text+0x6553d): Section mismatch in reference from the function intel_scu_devices_create() to the function .devinit.text: spi_register_board_info()
|The function intel_scu_devices_create() references
|the function __devinit spi_register_board_info().
|This is often because intel_scu_devices_create lacks a __devinit
|annotation or the annotation of spi_register_board_info is wrong.
|
|WARNING: vmlinux.o(.text+0x655f1): 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.

This patch marks intel_scu_devices_create() as devinit because it calls
a devinit function, spi_register_board_info().
The second problem with i2c_register_board_info() does not go away and
should crash once build as a module because i2c_register_board_info() is
long gone. Therefore this function should not be used from a module.
Going through all the code here makes me ask, why don't use DT here for
all that I2C and friends?

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
And I looked like this while going over the code:
   http://download.breakpoint.cc/meme/moorestown_no_dt.png

 arch/x86/platform/mrst/mrst.c        |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index e31bcd8..fd41a92 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -782,7 +782,7 @@ BLOCKING_NOTIFIER_HEAD(intel_scu_notifier);
 EXPORT_SYMBOL_GPL(intel_scu_notifier);
 
 /* Called by IPC driver */
-void intel_scu_devices_create(void)
+void __devinit intel_scu_devices_create(void)
 {
 	int i;
 

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31 21:20 Sebastian Andrzej Siewior [this message]
2012-06-06 15:18 ` [tip:x86/urgent] x86/intel/moorestown: Change intel_scu_devices_create() to __devinit tip-bot for Sebastian Andrzej Siewior

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=20120531212025.GA8519@breakpoint.cc \
    --to=sebastian@breakpoint.cc \
    --cc=alan@linux.intel.com \
    --cc=feng.tang@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=sameo@linux.intel.com \
    --cc=x86@kernel.org \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git