From: vishal.l.verma@linux.intel.com (Vishal Verma)
Subject: [PATCH] NVMe: Fix a signedness bug in nvme_trans_modesel_get_mp
Date: Mon, 13 May 2013 14:55:18 -0600 [thread overview]
Message-ID: <1368478518-5892-1-git-send-email-vishal.l.verma@linux.intel.com> (raw)
nvme_trans_modesel_get_mp() was defined with a unsigned return
type, but can return signed values.
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Vishal Verma <vishal.l.verma at linux.intel.com>
---
drivers/block/nvme-scsi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/nvme-scsi.c b/drivers/block/nvme-scsi.c
index fed54b0..b08639a 100644
--- a/drivers/block/nvme-scsi.c
+++ b/drivers/block/nvme-scsi.c
@@ -1654,7 +1654,7 @@ static void nvme_trans_modesel_save_bd(struct nvme_ns *ns, u8 *parm_list,
}
}
-static u16 nvme_trans_modesel_get_mp(struct nvme_ns *ns, struct sg_io_hdr *hdr,
+static int nvme_trans_modesel_get_mp(struct nvme_ns *ns, struct sg_io_hdr *hdr,
u8 *mode_page, u8 page_code)
{
int res = SNTI_TRANSLATION_SUCCESS;
--
1.7.0.4
next reply other threads:[~2013-05-13 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 20:55 Vishal Verma [this message]
2013-05-17 13:41 ` [PATCH] NVMe: Fix a signedness bug in nvme_trans_modesel_get_mp Matthew Wilcox
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=1368478518-5892-1-git-send-email-vishal.l.verma@linux.intel.com \
--to=vishal.l.verma@linux.intel.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).