[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4910c207-5dc2-0095-7a7f-75bb025b337c@huawei.com>
Date: Thu, 4 Oct 2018 12:48:16 +0100
From: John Garry <john.garry@...wei.com>
To: Colin Ian King <colin.king@...onical.com>,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [SCSI] pmcraid: PMC-Sierra MaxRAID driver to support 6Gb/s SAS
RAID controller
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
Powered by blists - more mailing lists