summary refs log tree commit diff stats
path: root/hw/nvme/ctrl.c
diff options
context:
space:
mode:
authorYao Xingtao <yaoxt.fnst@fujitsu.com>2024-07-22 05:17:28 -0400
committerKlaus Jensen <k.jensen@samsung.com>2024-07-22 14:43:17 +0200
commit4ea3de93a353b4462d96edd94be08d3be9484947 (patch)
tree1b8ad42ea3c70a212b4ec7371006fea06d7f60d6 /hw/nvme/ctrl.c
parent75209c071aab4488aef63c38fb53d0e4e3aaa062 (diff)
downloadfocaccia-qemu-4ea3de93a353b4462d96edd94be08d3be9484947.tar.gz
focaccia-qemu-4ea3de93a353b4462d96edd94be08d3be9484947.zip
hw/nvme: remove useless type cast
The type of req->cmd is NvmeCmd, cast the pointer of this type to
NvmeCmd* is useless.

Signed-off-by: Yao Xingtao <yaoxt.fnst@fujitsu.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/nvme/ctrl.c')
-rw-r--r--hw/nvme/ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 39782ddb2e..8d25174d25 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -4340,7 +4340,7 @@ static bool nvme_zone_matches_filter(uint32_t zafs, NvmeZone *zl)
 
 static uint16_t nvme_zone_mgmt_recv(NvmeCtrl *n, NvmeRequest *req)
 {
-    NvmeCmd *cmd = (NvmeCmd *)&req->cmd;
+    NvmeCmd *cmd = &req->cmd;
     NvmeNamespace *ns = req->ns;
     /* cdw12 is zero-based number of dwords to return. Convert to bytes */
     uint32_t data_size = (le32_to_cpu(cmd->cdw12) + 1) << 2;