Skip to contentSkip to conversation

nvme: fix cntlid type

PATCH New Christoph Hellwig 2 participants 3 messages Apr 16, 2016 – Apr 26, 2016 NVMe

lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

PATCH 1/1 nvme: fix cntlid type

Controller IDs in NVMe are unsigned 16-bit types. In the Fabrics driver we actually pass ctrl->id by reference, so we need it to have the correct type.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/nvme.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/nvme.h +1 -1
index 8e8fae8..9b96e75 100644
@@ -84,7 +84,7 @@ struct nvme_ctrl {
 	char serial[20];
 	char model[40];
 	char firmware_rev[8];
-	int cntlid;
+	u16 cntlid;
 
 	u32 ctrl_config;
 
Signature · 1 line
2.1.4
#2 lore raw

PATCH 1/1 nvme: fix cntlid type

In reply to Christoph Hellwig
Quoted 13 lines · Christoph Hellwig

Controller IDs in NVMe are unsigned 16-bit types. In the Fabrics driver we actually pass ctrl->id by reference, so we need it to have the correct type.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
  drivers/nvme/host/nvme.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/nvme.h +0 -0
index 8e8fae8..9b96e75 100644

drivers/nvme/host/nvme.h struct nvme_ctrl { · line 89

Quoted 7 lines
drivers/nvme/host/nvme.h +1 -1
@@ -84,7 +84,7 @@ struct nvme_ctrl {
  	char serial[20];
  	char model[40];
  	char firmware_rev[8];
-	int cntlid;
+	u16 cntlid;
 
  	u32 ctrl_config;

Looks fine, added for 4.7.

Signature · 1 line
Jens Axboe