lkml.org 
[lkml]   [2023]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] bnx2: remove deadcode in bnx2_init_cpus()
From
On 20/02/2023 08:31, Leon Romanovsky wrote:
> On Sun, Feb 19, 2023 at 06:22:25PM +0300, Maxim Korotkov wrote:
>> The load_cpu_fw function has no error return code
>> and always returns zero. Checking the value returned by
>> this function does not make sense.
>> As a result, bnx2_init_cpus() will also return only zero
>> Therefore, it will be safe to change the type of functions
>> to void and remove checking
>>
>> Found by Security Code and Linux Verification
>> Center (linuxtesting.org) with SVACE
>>
>> Fixes: 57579f7629a3 ("bnx2: Use request_firmware()")
>> Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
>> ---
>> changes v2:
>> - bnx2_init_cpu_fw() and bnx2_init_cpus() are void
>> - delete casts to void
>> - remove check of bnx2_init_cpus() in bnx2_init_chip()
>>
>
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

Not sure if it should go to -net, because it doesn't actually fix any
bug, more like refactoring which goes to -next, I believe.

\
 
 \ /
  Last update: 2023-03-27 00:29    [W:0.045 / U:1.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site