lkml.org 
[lkml]   [2019]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 05/19] net: ethernet: ti: cpsw: use local var dev in probe
>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 <grygorii.strashko@ti.com>
> ---
> 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

\
 
 \ /
  Last update: 2019-04-23 20:40    [W:0.254 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site