From: John Garry <john.garry@huawei.com>
To: Colin Ian King <colin.king@canonical.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [SCSI] pmcraid: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller
Date: Thu, 4 Oct 2018 12:48:16 +0100 [thread overview]
Message-ID: <4910c207-5dc2-0095-7a7f-75bb025b337c@huawei.com> (raw)
In-Reply-To: <f512d8fa-e782-0679-8140-0a27dd3b9062@canonical.com>
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
prev parent reply other threads:[~2018-10-04 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 8:28 Colin Ian King
2018-10-04 11:48 ` John Garry [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4910c207-5dc2-0095-7a7f-75bb025b337c@huawei.com \
--to=john.garry@huawei.com \
--cc=colin.king@canonical.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®