From: Yao Xingtao Date: Mon, 22 Jul 2024 09:17:28 +0000 (-0400) Subject: hw/nvme: remove useless type cast X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4ea3de93a353b4462d96edd94be08d3be9484947;p=qemu.git 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 Reviewed-by: Klaus Jensen Signed-off-by: Klaus Jensen --- 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;