lkml.org 
[lkml]   [2018]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [SCSI] pmcraid: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller
From
Date
On 04/10/2018 09:28, Colin Ian King wrote:
> Hi,
>
> Static analysis from CoverityScan (CID#114178 "Operands don't affect
> result") detected an issue in drivers/scsi/pmcraid.c, function
> pmcraid_init_res_table with the following check:
>
> if (pinstance->cfg_table->flags & MICROCODE_UPDATE_REQUIRED)
> pmcraid_err("IOA requires microcode download\n");
>
>
> pinstance->cfg_table->flags is a u8, MICROCODE_UPDATE_REQUIRED is 1 <<
> 31, so the & operation always results in false and the error message is
> never displayed. From my understanding, flags should be a u8, so there
> is something wrong here with the check. Any ideas?
>
> Colin
>
>

Maybe MICROCODE_UPDATE_REQUIRED definition is wrong and should be:
/* config_table.flags value */
-#define MICROCODE_UPDATE_REQUIRED PMC_BIT32(0)
+#define MICROCODE_UPDATE_REQUIRED PMC_BIT8(0)

John

\
 
 \ /
  Last update: 2018-10-04 13:49    [W:0.116 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site