Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Anson Huang <anson.huang@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>
Cc: Abel Vesa <abel.vesa@nxp.com>,
	"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Leonard Crestez <leonard.crestez@nxp.com>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH V2 2/2] soc: imx8: Use existing of_root directly
Date: Tue, 18 Jun 2019 09:44:35 +0000
Message-ID: <DB3PR0402MB3916AF21E4C4199E083790A1F5EA0@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20190618091442.GM29881@dragon>

Hi, Shawn

> -----Original Message-----
> From: Shawn Guo <shawnguo@kernel.org>
> Sent: Tuesday, June 18, 2019 5:15 PM
> To: Anson Huang <anson.huang@nxp.com>
> Cc: s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> Leonard Crestez <leonard.crestez@nxp.com>; viresh.kumar@linaro.org;
> Abel Vesa <abel.vesa@nxp.com>; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH V2 2/2] soc: imx8: Use existing of_root directly
> 
> On Fri, Jun 14, 2019 at 04:07:48PM +0800, Anson.Huang@nxp.com wrote:
> > From: Anson Huang <Anson.Huang@nxp.com>
> >
> > There is common of_root for reference, no need to find it from DT
> > again, use of_root directly to make driver simple.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
> 
> It cannot be applied.  Please resend by basing on my imx/drivers branch.

OK, just resent, there is a soc driver patch in linux-next, previously I did it based on it.
Now I change it to your git repo, you could meet conflict during merge.

Thanks,
Anson

> 
> Shawn
> 
> > ---
> > No changes.
> > ---
> >  drivers/soc/imx/soc-imx8.c | 9 ++-------
> >  1 file changed, 2 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/soc/imx/soc-imx8.c b/drivers/soc/imx/soc-imx8.c
> > index 5c7f330..b459bf2 100644
> > --- a/drivers/soc/imx/soc-imx8.c
> > +++ b/drivers/soc/imx/soc-imx8.c
> > @@ -105,7 +105,6 @@ static int __init imx8_soc_init(void)  {
> >  	struct soc_device_attribute *soc_dev_attr;
> >  	struct soc_device *soc_dev;
> > -	struct device_node *root;
> >  	const struct of_device_id *id;
> >  	u32 soc_rev = 0;
> >  	const struct imx8_soc_data *data;
> > @@ -117,12 +116,11 @@ static int __init imx8_soc_init(void)
> >
> >  	soc_dev_attr->family = "Freescale i.MX";
> >
> > -	root = of_find_node_by_path("/");
> > -	ret = of_property_read_string(root, "model", &soc_dev_attr-
> >machine);
> > +	ret = of_property_read_string(of_root, "model",
> > +&soc_dev_attr->machine);
> >  	if (ret)
> >  		goto free_soc;
> >
> > -	id = of_match_node(imx8_soc_match, root);
> > +	id = of_match_node(imx8_soc_match, of_root);
> >  	if (!id) {
> >  		ret = -ENODEV;
> >  		goto free_soc;
> > @@ -147,8 +145,6 @@ static int __init imx8_soc_init(void)
> >  		goto free_rev;
> >  	}
> >
> > -	of_node_put(root);
> > -
> >  	if (IS_ENABLED(CONFIG_ARM_IMX_CPUFREQ_DT))
> >  		platform_device_register_simple("imx-cpufreq-dt", -1, NULL,
> 0);
> >
> > @@ -159,7 +155,6 @@ static int __init imx8_soc_init(void)
> >  		kfree(soc_dev_attr->revision);
> >  free_soc:
> >  	kfree(soc_dev_attr);
> > -	of_node_put(root);
> >  	return ret;
> >  }
> >  device_initcall(imx8_soc_init);
> > --
> > 2.7.4
> >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14  8:07 [PATCH V2 1/2] soc: imx8: Fix potential kernel dump in error path Anson.Huang
2019-06-14  8:07 ` [PATCH V2 2/2] soc: imx8: Use existing of_root directly Anson.Huang
2019-06-18  9:14   ` Shawn Guo
2019-06-18  9:44     ` Anson Huang [this message]
2019-06-18  9:13 ` [PATCH V2 1/2] soc: imx8: Fix potential kernel dump in error path Shawn Guo

Reply instructions:

You may reply publically 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=DB3PR0402MB3916AF21E4C4199E083790A1F5EA0@DB3PR0402MB3916.eurprd04.prod.outlook.com \
    --to=anson.huang@nxp.com \
    --cc=abel.vesa@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=viresh.kumar@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

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

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


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


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