lkml.org 
[lkml]   [2016]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cxgb4: fix invalid checks in alloc_uld_rxqs
On Tuesday, August 08/23/16, 2016 at 08:16:19 +0200, Andrzej Hajda wrote:
> Local variable msi_idx defined as unsigned int is always >= 0, thus both
> 'if' checks are always true. On the other side presence of USING_MSIX flag
> suggests the checks should not be trivially true.
> The simplest solution is to replace incorrect checks with direct testing
> of adap->flags and remove spare variables.
>
> The problem has been detected using semantic patch
> scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
>

The correct fix is to have local variable 'msi_idx' as int instead of unsigned
int. Thanks for reporting the issue. Do you want me to send a V2?

Thanks,
Hari

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.040 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site