Re: [PATCH net-next 05/19] net: ethernet: ti: cpsw: use local var dev in probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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@xxxxxx>
> ---
>  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



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux