* [PATCH] scsi: hisi_sas: add missing break in switch statement
@ 2017-03-28 11:12 Colin King
2017-03-28 11:42 ` John Garry
2017-03-30 2:39 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-03-28 11:12 UTC (permalink / raw)
To: John Garry, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION
case got accidentally removed in an earlier commit, as it stands,
the ts->stat and ts->open_rej_reason are being updated twice for this
case which looks incorrect. Fix this by adding in the missing break
statement.
Detected by CoverityScan, CID#1422110 ("Missing break in switch")
Fixes: 634a9585f49c7 ("scsi: hisi_sas: process error codes according to their priority")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index a3af380dde9e..66c2de8b7b64 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -1709,6 +1709,7 @@ static void slot_err_v2_hw(struct hisi_hba *hisi_hba,
{
ts->stat = SAS_OPEN_REJECT;
ts->open_rej_reason = SAS_OREJ_NO_DEST;
+ break;
}
case TRANS_TX_OPEN_CNX_ERR_PROTOCOL_NOT_SUPPORTED:
{
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: hisi_sas: add missing break in switch statement
2017-03-28 11:12 [PATCH] scsi: hisi_sas: add missing break in switch statement Colin King
@ 2017-03-28 11:42 ` John Garry
2017-03-30 2:39 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: John Garry @ 2017-03-28 11:42 UTC (permalink / raw)
To: Colin King, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel, chenxiang (M), tanxiaofei
On 28/03/2017 12:12, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION
> case got accidentally removed in an earlier commit, as it stands,
> the ts->stat and ts->open_rej_reason are being updated twice for this
> case which looks incorrect. Fix this by adding in the missing break
> statement.
>
> Detected by CoverityScan, CID#1422110 ("Missing break in switch")
>
> Fixes: 634a9585f49c7 ("scsi: hisi_sas: process error codes according to their priority")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, checkpatch.pl would normally catch this but it was hidden in the
formatted patch
Signed-off-by: John Garry <john.garry@huawei.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: hisi_sas: add missing break in switch statement
2017-03-28 11:12 [PATCH] scsi: hisi_sas: add missing break in switch statement Colin King
2017-03-28 11:42 ` John Garry
@ 2017-03-30 2:39 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-03-30 2:39 UTC (permalink / raw)
To: Colin King
Cc: John Garry, James E . J . Bottomley, Martin K . Petersen,
linux-scsi, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> writes:
Colin,
> It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION
> case got accidentally removed in an earlier commit, as it stands, the
> ts->stat and ts->open_rej_reason are being updated twice for this case
> which looks incorrect. Fix this by adding in the missing break
> statement.
Applied to 4.12/scsi-queue.
Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-30 2:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 11:12 [PATCH] scsi: hisi_sas: add missing break in switch statement Colin King
2017-03-28 11:42 ` John Garry
2017-03-30 2:39 ` Martin K. Petersen
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).