public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Samuel Ortiz <sameo@openedhand.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Eric Miao <eric.miao@marvell.com>,
	Mike Rapoport <mike@compulab.co.il>
Subject: [patch 2.6.28-rc5] mfd da903x: section fix
Date: Mon, 17 Nov 2008 11:42:38 -0800	[thread overview]
Message-ID: <200811171142.38587.david-b@pacbell.net> (raw)

From: David Brownell <dbrownell@users.sourceforge.net>

This fixes the following section warning:

  WARNING: vmlinux.o(.devinit.text+0x3d36): Section mismatch in reference from the function 
  da903x_add_subdevs() to the function .devexit.text:da903x_remove_subdevs()
  The function __devinit da903x_add_subdevs() references
  a function __devexit da903x_remove_subdevs().
  This is often seen when error handling in the init function
  uses functionality in the exit path.
  The fix is often to remove the __devexit annotation of
  da903x_remove_subdevs() so it may be used outside an exit section.

It might be nice to have an "init and exit" section annotation for such
cases; in this case the waste is only about 40 bytes (x86 test build).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
 drivers/mfd/da903x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/mfd/da903x.c
+++ b/drivers/mfd/da903x.c
@@ -435,13 +435,13 @@ static const struct i2c_device_id da903x
 };
 MODULE_DEVICE_TABLE(i2c, da903x_id_table);
 
-static int __devexit __remove_subdev(struct device *dev, void *unused)
+static int __remove_subdev(struct device *dev, void *unused)
 {
 	platform_device_unregister(to_platform_device(dev));
 	return 0;
 }
 
-static int __devexit da903x_remove_subdevs(struct da903x_chip *chip)
+static int da903x_remove_subdevs(struct da903x_chip *chip)
 {
 	return device_for_each_child(chip->dev, NULL, __remove_subdev);
 }

             reply	other threads:[~2008-11-17 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17 19:42 David Brownell [this message]
2008-11-18  1:18 ` [patch 2.6.28-rc5] mfd da903x: section fix Eric Miao

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=200811171142.38587.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=dbrownell@users.sourceforge.net \
    --cc=eric.miao@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=sameo@openedhand.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