[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e43bae34-b711-a1ab-bba3-1a07a31e28a7@prevas.dk>
Date: Wed, 20 Jan 2021 12:26:31 +0100
From: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
To: Christophe Leroy <christophe.leroy@...roup.eu>,
netdev@...r.kernel.org
Cc: Li Yang <leoyang.li@....com>,
"David S . Miller" <davem@...emloft.net>,
Zhao Qiang <qiang.zhao@....com>, Andrew Lunn <andrew@...n.ch>,
Jakub Kicinski <kuba@...nel.org>,
Joakim Tjernlund <Joakim.Tjernlund@...inera.com>
Subject: Re: [PATCH net-next v2 08/17] ethernet: ucc_geth: remove
{rx,tx}_glbl_pram_offset from struct ucc_geth_private
On 20/01/2021 07.57, Christophe Leroy wrote:
>
>
> Le 19/01/2021 à 16:07, Rasmus Villemoes a écrit :
>> These fields are only used within ucc_geth_startup(), so they might as
>> well be local variables in that function rather than being stashed in
>> struct ucc_geth_private.
>>
>> Aside from making that struct a tiny bit smaller, it also shortens
>> some lines (getting rid of pointless casts while here), and fixes the
>> problems with using IS_ERR_VALUE() on a u32 as explained in commit
>> 800cd6fb76f0 ("soc: fsl: qe: change return type of cpm_muram_alloc()
>> to s32").
>>
>> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
>> ---
>> drivers/net/ethernet/freescale/ucc_geth.c | 21 +++++++++------------
>> drivers/net/ethernet/freescale/ucc_geth.h | 2 --
>> 2 files changed, 9 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
>> b/drivers/net/ethernet/freescale/ucc_geth.c
>> index 74ee2ed2fbbb..75466489bf9a 100644
>> --- a/drivers/net/ethernet/freescale/ucc_geth.c
>> +++ b/drivers/net/ethernet/freescale/ucc_geth.c
>> @@ -2351,6 +2351,7 @@ static int ucc_geth_startup(struct
>> ucc_geth_private *ugeth)
>> u8 function_code = 0;
>> u8 __iomem *endOfRing;
>> u8 numThreadsRxNumerical, numThreadsTxNumerical;
>> + s32 rx_glbl_pram_offset, tx_glbl_pram_offset;
>
> That's still a quite long name for a local variable.
True, but I wanted to keep this mechanical and easy to verify. If
somebody wants to clean up the local variable names
(numThreads[RT]xNumerical also stand out), that can be done later.
Rasmus
Powered by blists - more mailing lists