From patchwork Mon Jul 22 16:40:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Jensen X-Patchwork-Id: 1963340 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=irrelevant.dk header.i=@irrelevant.dk header.a=rsa-sha256 header.s=fm2 header.b=M/pZ0ZE0; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=if0WuUTq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WSQzN08Vtz1ybY for ; Tue, 23 Jul 2024 02:41:52 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVw5n-0002Bg-Rf; Mon, 22 Jul 2024 12:40:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVw5m-00025r-87; Mon, 22 Jul 2024 12:40:54 -0400 Received: from fhigh8-smtp.messagingengine.com ([103.168.172.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVw5k-0005yp-8Y; Mon, 22 Jul 2024 12:40:53 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id F0BC8114018E; Mon, 22 Jul 2024 12:40:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 22 Jul 2024 12:40:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1721666448; x= 1721752848; bh=gQ5fq+U7rvmGtIc7RTIkvxc11+PWUny77+A9bwdyj88=; b=M /pZ0ZE0jUaj0NJ7hK6LM/CxFbz0BdwA4UhE2BGctvhAbye431P17VkHN3LrdOdLT sxK2VuyNYrBRlekvRWt8XzG4n4x64aGzp3hF/mnP10G6MCPiLzWBmI5invZsdGRF aSHpu1aq45nQ7tY2Btt7jqdVFGeHt9ceG5JoCEi1EbINP0IDYbpe6plCqyDFo1j2 l/FV3R37Jkx8wdfInsbxgKjOmcAtQuQnHfS9cdRrpYf3E3HxfraapfQcYrTYvN/f BlpuKYIDrACV+nawLvPAA9XtGZrrz3ULjyPSWakLqHjuefk0RHko8SqqJVmafpZN JlMYxmkwjRW56h3Y5IQ+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1721666448; x= 1721752848; bh=gQ5fq+U7rvmGtIc7RTIkvxc11+PWUny77+A9bwdyj88=; b=i f0WuUTqqwMGmerJOvdzhWEfebvfqgqV1NdVEgdu2mjpWAL4+ozsJsKcOyQm/qTEO MXhRBI2ha8vIAvKiehB4wDNAmziqkCwGywkplZ3mdxdKs910AdFJA6nVu7o0xXDI 8CuRw/xM38iEv8uzPbP5eUyxtlZ1KdcnRR6gwYnHhApJG2UQW74vqglPMQFS9FAm 5n9whcJychT0RkX6BS6fM6M+JT9nJ+IHGNSpi//JcQ9Ywhu085NQF9Yg2c2GcX/P A9AEEnJLfDxI9s2uu7yof8Tl3GKcC0sIzQCDttOadO8EaMn9FIJU1KsrMh9Pz7fQ wS2+y6Z7sQvy4NisahNfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheejgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhlrghu shculfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrth htvghrnhepjefgieelgfeiveehkeeuveehheekfeevgeeigfehfefgjeejhefffeegudej udegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepih htshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: Feedback-ID: idc91472f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Jul 2024 12:40:44 -0400 (EDT) From: Klaus Jensen To: Peter Maydell , qemu-devel@nongnu.org Cc: Hanna Reitz , Klaus Jensen , Stefan Hajnoczi , qemu-block@nongnu.org, Fam Zheng , Keith Busch , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , Jesper Devantier , Kevin Wolf , Yao Xingtao , Klaus Jensen Subject: [PULL 4/4] hw/nvme: remove useless type cast Date: Mon, 22 Jul 2024 18:40:31 +0200 Message-ID: <20240722164026.61128-10-its@irrelevant.dk> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240722164026.61128-6-its@irrelevant.dk> References: <20240722164026.61128-6-its@irrelevant.dk> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=884; i=k.jensen@samsung.com; h=from:subject; bh=I7wOSlNznRhp9BIFFrOZe+eMeEqUddKkVg4XkqRvW6w=; b=owJ4nAFtAZL+kA0DAAoBTeGvMW1PDekByyZiAGaei3suGOTaapKPdoenfYVZFyOHPoRkVJR/v ID3Mp8U218sJYkBMwQAAQoAHRYhBFIoM6p14tzmokdmwE3hrzFtTw3pBQJmnot7AAoJEE3hrzFt Tw3pyEQH/RWb1OLc9TZ7VE2pw9QGjthzm9A33oozH5Heay/1TLni2yUgoB3U7rZDIrQu9A5X3RO rMmxMVFlXGjj2MKc6fvw043JkHLZjbppH31KuLsujeYwcA3KSlPVBetxPts77sEBKM5vsnix77t MS+9d3lDMhE7fbh9gQ+1sX9bxAhI0dH5y9v8uRVMgmhsltpXRigfl6ZMKfoAJxmbPQIipEo7Oel HW3RQ4apctIN2I06vvUPUtizUvsm7hHzeyFFvLLsXxCfFOZDfLzzO9HvDlrwMh9cJWYWa6MMlnC zaOnQBU2xYhIhFQAiQonaFXzEwQSSHPGvLdiVxzUlBM8Xby4mVBX56rO X-Developer-Key: i=k.jensen@samsung.com; a=openpgp; fpr=DDCA4D9C9EF931CC3468427263D56FC5E55DA838 Received-SPF: pass client-ip=103.168.172.159; envelope-from=its@irrelevant.dk; helo=fhigh8-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Yao Xingtao 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 --- hw/nvme/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 39782ddb2e76..8d25174d257b 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;