lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next 05/19] net: ethernet: ti: cpsw: use local var dev in probe
From
Date


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 <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.

It's has never been optimized for Christmas tree and
I'll keep cur layout for now.

--
Best regards,
grygorii

\
 
 \ /
  Last update: 2019-04-24 11:21    [W:0.046 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site