Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp354221yba; Wed, 24 Apr 2019 02:21:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxT35Nh9WY8bZYo7tvikEygf/Hnc/22c8eAAV0OnjqeLGRhCEnzBkdWXZFC8zeK6Il1/Qj1 X-Received: by 2002:a65:4108:: with SMTP id w8mr29575930pgp.236.1556097689678; Wed, 24 Apr 2019 02:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556097689; cv=none; d=google.com; s=arc-20160816; b=0/W2ycxPX1G9/LYqdD37xiPP4ur+ioJgNFFFNC5P0Bb4Sc7BcwK5yX1Cwq1wo2HCCM n4lwGfuCQI0YXhg+A1ta0p3LTwFwHRBxVGZQObCLBXwS/8rPZTSKXr154g1c8A+4WrRP 8BjRVhSTfHpi9mAvfd1iHyXZuH8V+sPHAZbhNiPQ3/ALaGoWmG6fK12mxFgRxjY1BWz7 l4zEX+wWqAKuUavjsDH+GYY5oMu3D2ZjOBlrFqG6dw4v9vUXaf3DDHLjnFHSbkwAt2CY Tyy0il47vgKZDF4CwC+6LzkVpu+1mZXt3xpyhQn198D0kIa5juJBotnaoAI/QEeoaujg jZfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=fLqbvIiTlwHatcsylozyk1LclE4cbdIrc/jXG/lUOY0=; b=0pN5wNHDmbm5UjVSdVIBeVXuggHE4UmVmBJ0d6Kz4s1kjUbYLnChi6hw5LMjULkekT kiVlydO3ljegchcpiWVHBR5XPCgr+EckLYGh5+zWkPUiB+QglEyUVMmNIRO3VPk6NP71 2hPno/2Yvtq7GepyXZul/efXG5VYqjoKGetWBgjxmsRRQuNlcvi4Dd23qhRYOHvx99P0 lREf7nhft5hlTobK/RbqWNRz/d818fK75x+FRPX9KgXp4Spi7UfzodYp+Ec+Ay2VZsjI F6duBfuyyK3niz9ix6NHVIrDlKZkbMhYA8nHmY5IZXqhxS8cJ3nZEB4jLRS05xg5ZMiM TxDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fFJIwvWx; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10si16918089pgv.589.2019.04.24.02.21.14; Wed, 24 Apr 2019 02:21:29 -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=@ti.com header.s=ti-com-17Q1 header.b=fFJIwvWx; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728054AbfDXJUX (ORCPT + 99 others); Wed, 24 Apr 2019 05:20:23 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:49456 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbfDXJUX (ORCPT ); Wed, 24 Apr 2019 05:20:23 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3O9KICG058659; Wed, 24 Apr 2019 04:20:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1556097618; bh=fLqbvIiTlwHatcsylozyk1LclE4cbdIrc/jXG/lUOY0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=fFJIwvWxY2t/YjWpy7eFX3K2tL2JKXcvjwsUzYgAjZhE99lcB4H0RZq/+ENnmcGgn KrnTB4vY/Qiffx6zd6to3MEqP1yJ9veZc45+rNEYFPB2F/L6aBXvNueK3qafbuZ4cP i4Da4scUDONFPi/riV8D7BNbSorHOyRsmH0OHqMU= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3O9KIgm063047 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 24 Apr 2019 04:20:18 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 24 Apr 2019 04:20:17 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 24 Apr 2019 04:20:17 -0500 Received: from [172.22.181.92] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3O9KCge002130; Wed, 24 Apr 2019 04:20:15 -0500 Subject: Re: [PATCH net-next 05/19] net: ethernet: ti: cpsw: use local var dev in probe To: Andrew Lunn CC: , Ilias Apalodimas , "David S . Miller" , Ivan Khoronzhuk , Florian Fainelli , Sekhar Nori , , , Murali Karicheri References: <1556024950-20752-1-git-send-email-grygorii.strashko@ti.com> <1556024950-20752-6-git-send-email-grygorii.strashko@ti.com> <20190423184015.GD28405@lunn.ch> From: Grygorii Strashko Message-ID: <609549ef-a283-4b3e-db8f-eb64660f7340@ti.com> Date: Wed, 24 Apr 2019 12:20:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190423184015.GD28405@lunn.ch> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23.04.19 21:40, Andrew Lunn wrote: >> On Tue, Apr 23, 2019 at 04:08:56PM +0300, Grygorii Strashko wrote: >> Use local variable struct device *dev in probe to simplify code. >> >> Signed-off-by: Grygorii Strashko >> --- >> drivers/net/ethernet/ti/cpsw.c | 65 +++++++++++++++++----------------- >> 1 file changed, 33 insertions(+), 32 deletions(-) >> >> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c >> index 13a339c64892..0b8cc4e6d9cd 100644 >> --- a/drivers/net/ethernet/ti/cpsw.c >> +++ b/drivers/net/ethernet/ti/cpsw.c >> @@ -3458,6 +3458,7 @@ static const struct soc_device_attribute cpsw_soc_devices[] = { >> >> static int cpsw_probe(struct platform_device *pdev) >> { >> + struct device *dev = &pdev->dev; >> struct clk *clk; >> struct cpsw_platform_data *data; >> struct net_device *ndev; > > It seems odd not to keep with the column layout? > Plus it would make it reverse Christmas tree. It's has never been optimized for Christmas tree and I'll keep cur layout for now. -- Best regards, grygorii