Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1610580 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-03-28 13:20 +0200 |
| Last post | 2017-03-30 04:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] scsi: hisi_sas: add missing break in switch statement Colin King <colin.king@canonical.com> - 2017-03-28 13:20 +0200
Re: [PATCH] scsi: hisi_sas: add missing break in switch statement John Garry <john.garry@huawei.com> - 2017-03-28 13:50 +0200
Re: [PATCH] scsi: hisi_sas: add missing break in switch statement "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-30 04:50 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-03-28 13:20 +0200 |
| Subject | [PATCH] scsi: hisi_sas: add missing break in switch statement |
| Message-ID | <tpXkl-6JL-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | John Garry <john.garry@huawei.com> |
|---|---|
| Date | 2017-03-28 13:50 +0200 |
| Message-ID | <tpXNo-6Vx-5@gated-at.bofh.it> |
| In reply to | #1610580 |
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>
[toc] | [prev] | [next] | [standalone]
| From | "Martin K. Petersen" <martin.petersen@oracle.com> |
|---|---|
| Date | 2017-03-30 04:50 +0200 |
| Message-ID | <tqyjT-824-5@gated-at.bofh.it> |
| In reply to | #1610580 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web