Skip to contentSkip to conversation

NVMe: add missing command size checks

PATCH New Helen Koike 2 participants 2 messages May 2, 2016 – May 3, 2016 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NVMe: add missing command size checks

Some commands were not being checked

Signed-off-by Helen Koike <helen.koike at collabora.co.uk>
---
 drivers/nvme/host/pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/nvme/host/pci.c +3 -0
index 4fd733f..caf8e45 100644
@@ -171,6 +171,9 @@ static inline void _nvme_check_size(void)
 	BUILD_BUG_ON(sizeof(struct nvme_features) != 64);
 	BUILD_BUG_ON(sizeof(struct nvme_format_cmd) != 64);
 	BUILD_BUG_ON(sizeof(struct nvme_abort_cmd) != 64);
+	BUILD_BUG_ON(sizeof(struct nvme_identify) != 64);
+	BUILD_BUG_ON(sizeof(struct nvme_download_firmware) != 64);
+	BUILD_BUG_ON(sizeof(struct nvme_dsm_cmd) != 64);
 	BUILD_BUG_ON(sizeof(struct nvme_command) != 64);
 	BUILD_BUG_ON(sizeof(struct nvme_id_ctrl) != 4096);
 	BUILD_BUG_ON(sizeof(struct nvme_id_ns) != 4096);
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 NVMe: add missing command size checks

Quoted 3 lines · Helen Koike

Some commands were not being checked

Signed-off-by Helen Koike <helen.koike at collabora.co.uk>

Looks fine,

Reviewed-by Christoph Hellwig <hch at lst.de>