From: Michael Cyr <mikecyr@us.ibm.com>
To: nab@linux-iscsi.org, joe@perches.com
Cc: hch@infradead.org, bryantly@linux.vnet.ibm.com,
James.Bottomley@HansenPartnership.com, tyreld@linux.vnet.ibm.com,
brking@linux.vnet.ibm.com, akpm@linux-foundation.org,
bart.vanassche@sandisk.com, gregkh@linuxfoundation.org,
seroyer@linux.vnet.ibm.com, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org, martin.petersen@oracle.com,
Michael Cyr <mikecyr@us.ibm.com>
Subject: [PATCH v2 6/6] ibmvscsis: Issues from Dan Carpenter/Smatch
Date: Thu, 13 Oct 2016 11:02:43 -0500 [thread overview]
Message-ID: <1476374563-13967-7-git-send-email-mikecyr@us.ibm.com> (raw)
In-Reply-To: <1476374563-13967-1-git-send-email-mikecyr@us.ibm.com>
Signed-off-by: Michael Cyr <mikecyr@us.ibm.com>
Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
---
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index fe220a1..c9fa356 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -1896,14 +1896,7 @@ static long ibmvscsis_mad(struct scsi_info *vscsi, struct viosrp_crq *crq)
pr_debug("mad: type %d\n", be32_to_cpu(mad->type));
- if (be16_to_cpu(mad->length) < 0) {
- dev_err(&vscsi->dev, "mad: length is < 0\n");
- ibmvscsis_post_disconnect(vscsi,
- ERR_DISCONNECT_RECONNECT, 0);
- rc = SRP_VIOLATION;
- } else {
- rc = ibmvscsis_process_mad(vscsi, iue);
- }
+ rc = ibmvscsis_process_mad(vscsi, iue);
pr_debug("mad: status %hd, rc %ld\n", be16_to_cpu(mad->status),
rc);
@@ -2523,7 +2516,6 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi,
dev_err(&vscsi->dev, "0x%llx: parsing SRP descriptor table failed.\n",
srp->tag);
goto fail;
- return;
}
cmd->rsp.sol_not = srp->sol_not;
@@ -3282,7 +3274,8 @@ static int ibmvscsis_probe(struct vio_dev *vdev,
INIT_LIST_HEAD(&vscsi->waiting_rsp);
INIT_LIST_HEAD(&vscsi->active_q);
- snprintf(vscsi->tport.tport_name, 256, "%s", dev_name(&vdev->dev));
+ snprintf(vscsi->tport.tport_name, IBMVSCSIS_NAMELEN, "%s",
+ dev_name(&vdev->dev));
pr_debug("probe tport_name: %s\n", vscsi->tport.tport_name);
--
2.5.0
next prev parent reply other threads:[~2016-10-13 16:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 22:58 [PATCH v1 0/3] Fixes for problems found during testing Michael Cyr
2016-10-11 22:58 ` [PATCH v1 1/3] Synchronization of cmds during termination conditions Michael Cyr
2016-10-12 6:20 ` Greg KH
2016-10-12 14:09 ` Bryant G. Ly
2016-10-11 22:58 ` [PATCH v1 2/3] Properly handle if target_submit_cmd/tmr fails Michael Cyr
2016-10-11 22:58 ` [PATCH v1 3/3] Return correct partition name/number to client Michael Cyr
2016-10-13 16:02 ` [PATCH v2 0/6] Fixes for ibmvscsis driver Michael Cyr
2016-10-13 16:02 ` [PATCH v2 1/6] ibmvscsis: Rearrange functions for future patches Michael Cyr
2016-10-13 16:02 ` [PATCH v2 2/6] ibmvscsis: Synchronize cmds at tpg_enable_store time Michael Cyr
2016-10-13 16:02 ` [PATCH v2 3/6] ibmvscsis: Synchronize cmds at remove time Michael Cyr
2016-10-13 16:02 ` [PATCH v2 4/6] ibmvscsis: Clean up properly if target_submit_cmd/tmr fails Michael Cyr
2016-10-13 16:02 ` [PATCH v2 5/6] ibmvscsis: Return correct partition name/# to client Michael Cyr
2016-10-13 16:02 ` Michael Cyr [this message]
[not found] ` <8fcdcfd1eedecae72a868ab45a872e06@linux.vnet.ibm.com>
2016-10-17 16:15 ` [PATCH v2 0/6] Fixes for ibmvscsis driver Tyrel Datwyler
2016-10-19 1:21 ` Martin K. Petersen
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=1476374563-13967-7-git-send-email-mikecyr@us.ibm.com \
--to=mikecyr@us.ibm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=bart.vanassche@sandisk.com \
--cc=brking@linux.vnet.ibm.com \
--cc=bryantly@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=joe@perches.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nab@linux-iscsi.org \
--cc=seroyer@linux.vnet.ibm.com \
--cc=target-devel@vger.kernel.org \
--cc=tyreld@linux.vnet.ibm.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).