[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL for-6.0 3/7] hw/block/nvme: fix the nsid 'invalid' value
From: |
Klaus Jensen |
Subject: |
[PULL for-6.0 3/7] hw/block/nvme: fix the nsid 'invalid' value |
Date: |
Tue, 6 Apr 2021 22:46:23 +0200 |
From: Klaus Jensen <k.jensen@samsung.com>
The `nvme_nsid()` function returns '-1' (FFFFFFFFh) when the given
namespace is NULL. Since FFFFFFFFh is actually a valid namespace
identifier (the "broadcast" value), change this to be '0' since that
actually *is* the invalid value.
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
---
hw/block/nvme-ns.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme-ns.h b/hw/block/nvme-ns.h
index 9ab7894fc83e..82340c4b2574 100644
--- a/hw/block/nvme-ns.h
+++ b/hw/block/nvme-ns.h
@@ -96,7 +96,7 @@ static inline uint32_t nvme_nsid(NvmeNamespace *ns)
return ns->params.nsid;
}
- return -1;
+ return 0;
}
static inline bool nvme_ns_shared(NvmeNamespace *ns)
--
2.31.1
- [PULL for-6.0 0/7] emulated nvme fixes for -rc3, Klaus Jensen, 2021/04/06
- [PULL for-6.0 2/7] hw/block/nvme: fix missing string representation for ns attachment, Klaus Jensen, 2021/04/06
- [PULL for-6.0 1/7] hw/block/nvme: fix pi constraint check, Klaus Jensen, 2021/04/06
- [PULL for-6.0 3/7] hw/block/nvme: fix the nsid 'invalid' value,
Klaus Jensen <=
- [PULL for-6.0 4/7] hw/block/nvme: fix warning about legacy namespace configuration, Klaus Jensen, 2021/04/06
- [PULL for-6.0 7/7] hw/block/nvme: add missing copyright headers, Klaus Jensen, 2021/04/06
- [PULL for-6.0 5/7] hw/block/nvme: update dmsrl limit on namespace detachment, Klaus Jensen, 2021/04/06
- [PULL for-6.0 6/7] hw/block/nvme: fix handling of private namespaces, Klaus Jensen, 2021/04/06