Re: [PATCH] cxgb4: fix invalid checks in alloc_uld_rxqs

2016-08-23 Thread Hariprasad Shenai
On Tuesday, August 08/23/16, 2016 at 10:01:59 +0200, Andrzej Hajda wrote: > On 08/23/2016 09:46 AM, Hariprasad Shenai wrote: > > 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 a

Re: [PATCH] cxgb4: fix invalid checks in alloc_uld_rxqs

2016-08-23 Thread Andrzej Hajda
On 08/23/2016 09:46 AM, Hariprasad Shenai wrote: > 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 chec

Re: [PATCH] cxgb4: fix invalid checks in alloc_uld_rxqs

2016-08-23 Thread Hariprasad Shenai
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 soluti

[PATCH] cxgb4: fix invalid checks in alloc_uld_rxqs

2016-08-22 Thread Andrzej Hajda
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 sp