From: Ludovic Desroches <ludovic.desroches@atmel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Pramod Gurav <pramod.gurav@smartplayin.com>,
<linux-kernel@vger.kernel.org>,
Ludovic Desroches <ludovic.desroches@atmel.com>,
Chris Ball <chris@printf.net>,
Ulf Hansson <ulf.hansson@linaro.org>, <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] mmc: atmel-mci: fix mismatched section on atmci_cleanup_slot
Date: Mon, 29 Sep 2014 09:34:25 +0200 [thread overview]
Message-ID: <20140929073425.GD1868@ldesroches-Latitude-E6320> (raw)
In-Reply-To: <201409262134.58457.arnd@arndb.de>
On Fri, Sep 26, 2014 at 09:34:58PM +0200, Arnd Bergmann wrote:
> As of 528bc7808f4e ("mmc: atmel-mci: Release mmc resources on failure in probe"),
> the atmci_probe() function calls atmci_cleanup_slot in the failure path.
>
> This causes a new warning whenever the driver is built:
>
> WARNING: drivers/mmc/host/built-in.o(.init.text+0xa04): Section mismatch in reference from the function atmci_probe() to the function .exit.text:atmci_cleanup_slot()
> The function __init atmci_probe() references
> a function __exit atmci_cleanup_slot().
>
> Gcc correctly warns about this function getting dropped in the link stage
> for the built-in case, which would cause undefined behavior when this error
> path is hit. The solution is to simply drop the __exit annotation.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Thanks, I also missed this warning when compiling.
> Fixes: 528bc7808f4e ("mmc: atmel-mci: Release mmc resources on failure in probe")
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 772ef5b0e4d5..974626087732 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -2244,7 +2244,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
> return 0;
> }
>
> -static void __exit atmci_cleanup_slot(struct atmel_mci_slot *slot,
> +static void atmci_cleanup_slot(struct atmel_mci_slot *slot,
> unsigned int id)
> {
> /* Debugfs stuff is cleaned up by mmc core */
next prev parent reply other threads:[~2014-09-29 7:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 10:20 [PATCH v2 1/2] mmc: atmel-mci: Switch to using managed resource in probe Pramod Gurav
2014-09-23 10:20 ` [PATCH v2 2/2] mmc: atmel-mci: Release mmc resources on failure " Pramod Gurav
2014-09-23 12:43 ` Ludovic Desroches
2014-09-24 8:49 ` Ulf Hansson
2014-09-26 19:34 ` [PATCH] mmc: atmel-mci: fix mismatched section on atmci_cleanup_slot Arnd Bergmann
2014-09-27 3:15 ` Pramod Gurav
2014-09-27 11:59 ` Arnd Bergmann
2014-09-29 7:34 ` Ludovic Desroches [this message]
2014-09-29 9:43 ` Ulf Hansson
2014-09-23 12:43 ` [PATCH v2 1/2] mmc: atmel-mci: Switch to using managed resource in probe Ludovic Desroches
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=20140929073425.GD1868@ldesroches-Latitude-E6320 \
--to=ludovic.desroches@atmel.com \
--cc=arnd@arndb.de \
--cc=chris@printf.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=pramod.gurav@smartplayin.com \
--cc=ulf.hansson@linaro.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
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
all inboxes | Powered by JetHome®