linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>,
	Sathya Prakash <sathya.prakash@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	MPT-FusionLinux.pdl@broadcom.com,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: re: scsi: mpt3sas: Handle firmware faults during second half of IOC init
Date: Tue, 1 Jun 2021 12:41:35 +0100	[thread overview]
Message-ID: <78ceab25-cc36-ac43-1e5a-5e38c22eab21@canonical.com> (raw)

Hi,

Static analysis with Coverity on linux-next has detected an issue in
drivers/scsi/mpt3sas/mpt3sas_base.c with the following commit:

commit a0815c45c89f544861eae55d85ccee6b1b1451e8
Author: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Date:   Tue May 18 10:46:25 2021 +0530

    scsi: mpt3sas: Handle firmware faults during second half of IOC init

The analysis is as follows:

7208        if (ioc->port_enable_cmds.status & MPT3_CMD_COMPLETE_ASYNC) {
7209                if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
7210                        mpt3sas_port_enable_complete(ioc);
7211                        return 1;
7212                } else {
7213                        ioc->start_scan_failed = ioc_status;
7214                        ioc->start_scan = 0;
7215                        return 1;
7216                }

Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached:

7217                ioc->port_enable_cmds.status &=
~MPT3_CMD_COMPLETE_ASYNC;
7218        }

The return 1 statements in either parts of the proceeding if statement
end up with the ioc->port_enable_cmds.status masking assignment never
being reached.

Colin

                 reply	other threads:[~2021-06-01 11:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=78ceab25-cc36-ac43-1e5a-5e38c22eab21@canonical.com \
    --to=colin.king@canonical.com \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=jejb@linux.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 \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.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;
as well as URLs for NNTP newsgroup(s).