[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <74fa3578-b62f-4618-4af1-d8105e561800@cmss.chinamobile.com>
Date: Tue, 21 Apr 2020 19:22:20 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: Joe Perches <joe@...ches.com>, davem@...emloft.net,
herbert@...dor.apana.org.au
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
Shengju Zhang <zhangshengju@...s.chinamobile.com>
Subject: Re: [PATCH] crypto: Delete redundant variable definition
Hi, Joe:
On 2020/4/19 19:44, Joe Perches wrote:
> On Sun, 2020-04-19 at 15:12 +0800, Tang Bin wrote:
>> The variable "i" is redundant to be assigned a value
>> of zero,because it's assigned in the for loop, so remove
>> redundant one here.
>>
>> Signed-off-by: Shengju Zhang <zhangshengju@...s.chinamobile.com>
>> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
>>
>> ---
>> drivers/crypto/bcm/cipher.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c
>> index c8b940854..5db23c18c 100644
>> --- a/drivers/crypto/bcm/cipher.c
>> +++ b/drivers/crypto/bcm/cipher.c
>> @@ -4724,7 +4724,6 @@ static int spu_dt_read(struct platform_device *pdev)
>> spu->spu_type = matched_spu_type->type;
>> spu->spu_subtype = matched_spu_type->subtype;
>>
>> - i = 0;
>> for (i = 0; (i < MAX_SPUS) && ((spu_ctrl_regs =
>> platform_get_resource(pdev, IORESOURCE_MEM, i)) != NULL); i++) {
> Maybe the for loop could be simplified too by
> moving the assignment inside the loop.
>
> Also, the %pe extension could be used.
Sorry for the delay. Thank you for your advice, I was already thinking
about optimizing this place.
Thanks,
Tang Bin
>
Powered by blists - more mailing lists