From: Chaitanya Kulkarni <kch@nvidia.com>
To: <hare@suse.de>
Cc: <hch@lst.de>, <sagi@grimberg.me>,
<linux-nvme@lists.infradead.org>, <kbusch@kernel.org>,
Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH V2 4/4] nvmet-auth: use correct type for status variable
Date: Sun, 4 Jun 2023 23:44:34 -0700 [thread overview]
Message-ID: <20230605064434.45233-5-kch@nvidia.com> (raw)
In-Reply-To: <20230605064434.45233-1-kch@nvidia.com>
In structructure nvmet_sq dhchap_step member is responsible to hold
following values :-
NVME_AUTH_DHCHAP_FAILURE_FAILED = 0x01,
NVME_AUTH_DHCHAP_FAILURE_NOT_USABLE = 0x02,
NVME_AUTH_DHCHAP_FAILURE_CONCAT_MISMATCH = 0x03,
NVME_AUTH_DHCHAP_FAILURE_HASH_UNUSABLE = 0x04,
NVME_AUTH_DHCHAP_FAILURE_DHGROUP_UNUSABLE = 0x05,
NVME_AUTH_DHCHAP_FAILURE_INCORRECT_PAYLOAD = 0x06,
NVME_AUTH_DHCHAP_FAILURE_INCORRECT_MESSAGE = 0x07,
These values can never be negative, hence change int type of
dhchap_step to u16 in the nvmet_sq declaration.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
drivers/nvme/target/nvmet.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
index 6cf723bc664e..66d8673c3ebf 100644
--- a/drivers/nvme/target/nvmet.h
+++ b/drivers/nvme/target/nvmet.h
@@ -113,7 +113,7 @@ struct nvmet_sq {
struct delayed_work auth_expired_work;
u16 dhchap_tid;
u16 dhchap_status;
- int dhchap_step;
+ u16 dhchap_step;
u8 *dhchap_c1;
u8 *dhchap_c2;
u32 dhchap_s1;
--
2.40.0
next prev parent reply other threads:[~2023-06-05 7:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 6:44 [PATCH V2 0/4] nvmet-auth: auth send / receive cleanup Chaitanya Kulkarni
2023-06-05 6:44 ` [PATCH V2 1/4] nvmet-auth: use common helper to check secp/spsp Chaitanya Kulkarni
2023-06-05 7:42 ` Hannes Reinecke
2023-06-05 6:44 ` [PATCH V2 2/4] nvmet_auth: use common helper for buffer alloc Chaitanya Kulkarni
2023-06-05 7:45 ` Hannes Reinecke
2023-06-05 6:44 ` [PATCH V2 3/4] nvmet-auth: use helper for auth send/recv cmd prep Chaitanya Kulkarni
2023-06-05 7:46 ` Hannes Reinecke
2023-06-05 8:41 ` Chaitanya Kulkarni
2023-06-07 4:57 ` Christoph Hellwig
2023-06-05 6:44 ` Chaitanya Kulkarni [this message]
2023-06-05 7:49 ` [PATCH V2 4/4] nvmet-auth: use correct type for status variable Hannes Reinecke
2023-06-07 4:58 ` Christoph Hellwig
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=20230605064434.45233-5-kch@nvidia.com \
--to=kch@nvidia.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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).