linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Martin Kaiser <martin@kaiser.cx>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mtd: rawnand: mxc: remove __init qualifier from mxcnd_probe_dt
Date: Wed, 27 Jun 2018 23:35:12 +0200	[thread overview]
Message-ID: <20180627233512.44e820fe@bbrezillon> (raw)
In-Reply-To: <1530132464-8210-1-git-send-email-martin@kaiser.cx>

On Wed, 27 Jun 2018 22:47:44 +0200
Martin Kaiser <martin@kaiser.cx> wrote:

> Using the sysfs unbind, bind nodes, mxcnd_probe and mxcnd_probe_dt can
> potentially be called at any time. After the __init functions are cleaned,
> mxcnd_probe_dt is no longer available. Calling it anyway causes a crash.
> 
> mxcnd_probe used to be marked as __init, this was removed years ago.
> Remove the __init qualifier from from mxcnd_probe_dt as well.
> 
> Fixes: 06f255106923 ("mtd: remove use of __devinit")
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>

Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>

> ---
> changes in v3
>    - show the first 12 characters of the SHA-1 ID in the Fixes: tag
> 
> changes in v2
>    - rephrased the commit message
>    - added a Fixes: tag
> 
>  drivers/mtd/nand/raw/mxc_nand.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
> index 26cef218bb43..90cfb5e730aa 100644
> --- a/drivers/mtd/nand/raw/mxc_nand.c
> +++ b/drivers/mtd/nand/raw/mxc_nand.c
> @@ -1686,7 +1686,7 @@ static const struct of_device_id mxcnd_dt_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(of, mxcnd_dt_ids);
>  
> -static int __init mxcnd_probe_dt(struct mxc_nand_host *host)
> +static int mxcnd_probe_dt(struct mxc_nand_host *host)
>  {
>  	struct device_node *np = host->dev->of_node;
>  	const struct of_device_id *of_id =
> @@ -1700,7 +1700,7 @@ static int __init mxcnd_probe_dt(struct mxc_nand_host *host)
>  	return 0;
>  }
>  #else
> -static int __init mxcnd_probe_dt(struct mxc_nand_host *host)
> +static int mxcnd_probe_dt(struct mxc_nand_host *host)
>  {
>  	return 1;
>  }

  reply	other threads:[~2018-06-27 21:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 14:50 [PATCH] mtd: rawnand: mxc: remove __init qualifier from mxcnd_probe_dt Martin Kaiser
2018-06-26  7:10 ` Miquel Raynal
2018-06-26  7:24   ` Boris Brezillon
2018-06-26  7:36     ` Miquel Raynal
2018-06-27  8:55       ` Martin Kaiser
2018-06-27  8:52 ` [PATCH v2] " Martin Kaiser
2018-06-27  9:01   ` Miquel Raynal
2018-06-27 20:47 ` [PATCH v3] " Martin Kaiser
2018-06-27 21:35   ` Boris Brezillon [this message]
2018-07-01 18:12   ` Miquel Raynal

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=20180627233512.44e820fe@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=dwmw2@infradead.org \
    --cc=fabio.estevam@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=martin@kaiser.cx \
    --cc=miquel.raynal@bootlin.com \
    --cc=s.hauer@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).