Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3531358ybi; Tue, 18 Jun 2019 02:16:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz10abjjmoMAK5XwlzY7e8sYmIHwTKipNc86dXNKSk3y3WJjYRWoMrFgSygK46TND8G3Lsu X-Received: by 2002:a17:902:7894:: with SMTP id q20mr102613721pll.339.1560849396419; Tue, 18 Jun 2019 02:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560849396; cv=none; d=google.com; s=arc-20160816; b=aflcomDW0ktLABvy5nltfY+xIEsz4DW3lpyOetGg0WB6QwEXHaTi7FpMlYk6v8Mwf7 WTWYowPIKTOu+1IlXN53VSBKEqnXuO1sbW19GX6H/gGKkHMJSOu0zj4ddE/5OkwiPqJ4 G6tw32hZkUFV/fuXRB9hU30uQnHM1Wi9kta7JYy94UNe75xpajtry+dAWiYQsYsQRyJx VabpGfF+cjmH5lu/OyauRcshnHEuIUcGncg3lM2HQ2qtBNi4G5PnavdxsQKuV6xFJJc0 VpnXi7M1Fi+DJm6gtOmKOR8Rf0tOE2MAJLU2OsWkowvfc1pGsJ3l0Itkx8NBOiS0nxBw kCyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PgY2L8h5iDID3ce722lmtKa081f89BEAP/gd4a3Bqgg=; b=dIhqLiqNfgcVAnZ/QKCJcCiZSWUkx2bedlgyIKUN/Av83FRhoZ5XhDdfVOhX+F8aY0 jqGPzKND6NPyF2uB3xtOqAjHTEXv3ZIaN+I+OGnTwUEb67sEKX1JjyH6GGIVcJr5qLdS PBvMUHAVRN2IxXekDl0xEjEvrG4mjZI4EpIfOc3UxG9TMonEET9gQu0+xpqL1qV7x44E gby4HQLQQAgCOjpY5YCFS3IsUkMP98Kx4jwAcFIwNBUid9X5B5vZRj0E5X95WRldMk6+ LimlDV36a2knHG5GvnvOaQEshoCAy/DySUn7T4/r6ey/jBVvszzg/1nFeoWA7Lmn3zlp Kg/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pp6ieOAE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p16si13537982pgd.370.2019.06.18.02.16.16; Tue, 18 Jun 2019 02:16:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pp6ieOAE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729334AbfFRJPl (ORCPT + 99 others); Tue, 18 Jun 2019 05:15:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:50238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728385AbfFRJPk (ORCPT ); Tue, 18 Jun 2019 05:15:40 -0400 Received: from dragon (li1322-146.members.linode.com [45.79.223.146]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 55CE4206BA; Tue, 18 Jun 2019 09:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560849340; bh=gA2YgqZkn0Wi5r13BQk+BBwL1hF7Y6PBm5f+5w9qDqI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pp6ieOAEYOEwunUaoY5CXNUYhXinz+c5vNQxqrWJvgbFUtPzEsYuJwy9EBfV3oHKr M6OXEtFbG+jD1EGPrZYfF1JCua1MXePEbLHYapmQVdSNnP8bmY3YzL7Mme5OwCe4no wHteUl8FhhCoZnjFrT2v3738Im/QqoU1mk6jZjTk= Date: Tue, 18 Jun 2019 17:14:45 +0800 From: Shawn Guo To: Anson.Huang@nxp.com Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, leonard.crestez@nxp.com, viresh.kumar@linaro.org, abel.vesa@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linux-imx@nxp.com Subject: Re: [PATCH V2 2/2] soc: imx8: Use existing of_root directly Message-ID: <20190618091442.GM29881@dragon> References: <20190614080748.32997-1-Anson.Huang@nxp.com> <20190614080748.32997-2-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190614080748.32997-2-Anson.Huang@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 14, 2019 at 04:07:48PM +0800, Anson.Huang@nxp.com wrote: > From: Anson Huang > > 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 > Reviewed-by: Dong Aisheng It cannot be applied. Please resend by basing on my imx/drivers branch. 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 >