Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3916543yba; Tue, 23 Apr 2019 11:41:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmMK0sWFyCuxxTzWzrQdUXd1NnNuNMbnxtnBocx5pZUA/9aILl1mCLFeX1yAaj9CX6SBU0 X-Received: by 2002:a62:2687:: with SMTP id m129mr29347746pfm.204.1556044909031; Tue, 23 Apr 2019 11:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556044909; cv=none; d=google.com; s=arc-20160816; b=d6smv0dgIhDmelnq+RAyDzwa3LTjihlD4mrBoaKhzOPreCmVJxWvQnFLrp1EsJpb41 XIQD/xmUwdrPY9BrfpORB3KHej1pR5y1Y7sbyUDxxYtB7WlyApT5mdlHPGQmmvZlHfKu WKVfoll0NCxprTbWCbGbarytD/mK6VsHQYc7ZeYGbTcMAJoRsnpmObOU46mSoSCfbhRr 2bEsCW3Gx+PXaahU+zMafpR1bF1p+F7WZxizbku/T8HcyVwkql8Betiw6sgn2UZJgKca JgoegWB5iiUfaqj1s6M+FnoGRIjiG/gX5zEGUO59Ezh8JHwbhUbjd4PA/+42lncFtk5a 92Sg== 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=se1yZbAiaRAEydO7GRf579Nsy4hT0JqoGRsn/rRSR4I=; b=YBsm4hhAVA/IIJH5pIog9Sna/RvgL4Y5rG99Q+tztd78TDTJOzBpELeqrYMuYrGMNJ VgOvuYzSGlWaLhAvWdI8O8cjzz2G+3B+wH8+APMktk45aatsT29KWJf3s7ZWEBQYDesG hAzensU6WeBpBh7TzX5hp9Nqe7zj+57GDkjq6rzoE1u9tiWDHwxRR5T+LReY5BZdj5p6 cg9PVVYYPdIONYpO6DJ281Ii5ZerKteYpeQ5pL/r59qaMWnqeu3TDOS0G7IzrBWOBGB0 3rumEkL1Jt89ABUBtWhUlzu7sPj765nV0k90N3ObbnOBig8EX3PDILDVY8jE59edBZVZ vp2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=QfYzDCil; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h185si15709393pge.368.2019.04.23.11.41.34; Tue, 23 Apr 2019 11:41:49 -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=fail header.i=@lunn.ch header.s=20171124 header.b=QfYzDCil; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726579AbfDWSkT (ORCPT + 99 others); Tue, 23 Apr 2019 14:40:19 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:41769 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbfDWSkT (ORCPT ); Tue, 23 Apr 2019 14:40:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=se1yZbAiaRAEydO7GRf579Nsy4hT0JqoGRsn/rRSR4I=; b=QfYzDCilkMi5ax/jZpIn5zddoq nJc9ypah63NvowCrp0vZTob8aOTsuwIoObBbstGlPZfUKXQQZH/L8beZsRluCk6XKhkubYY51O2Y8 p68Op5ukumaRs4zuo4U0hasZPlUhC/prYbJ9ezMXaKiX/a0/MSux6e5R9PF1vGcPRlC0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hJ0L1-0001S6-FJ; Tue, 23 Apr 2019 20:40:15 +0200 Date: Tue, 23 Apr 2019 20:40:15 +0200 From: Andrew Lunn To: Grygorii Strashko Cc: netdev@vger.kernel.org, Ilias Apalodimas , "David S . Miller" , Ivan Khoronzhuk , Florian Fainelli , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Murali Karicheri Subject: Re: [PATCH net-next 05/19] net: ethernet: ti: cpsw: use local var dev in probe Message-ID: <20190423184015.GD28405@lunn.ch> References: <1556024950-20752-1-git-send-email-grygorii.strashko@ti.com> <1556024950-20752-6-git-send-email-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1556024950-20752-6-git-send-email-grygorii.strashko@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >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. Andrew