qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: Yao Xingtao <yaoxt.fnst@fujitsu.com>
Cc: qemu-devel@nongnu.org, Keith Busch <kbusch@kernel.org>,
	Jesper Devantier <foss@defmacro.it>,
	qemu-block@nongnu.org
Subject: Re: [PATCH 2/2] nvme/ctrl: remove useless type cast
Date: Mon, 22 Jul 2024 13:52:47 +0200	[thread overview]
Message-ID: <Zp5IDzX686apM6mH@cormorant.local> (raw)
In-Reply-To: <20240722091728.4334-3-yaoxt.fnst@fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

On Jul 22 05:17, Yao Xingtao wrote:
> 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>
> ---
>  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 5b1b0cabcfc3..221818f551cd 100644
> --- a/hw/nvme/ctrl.c
> +++ b/hw/nvme/ctrl.c
> @@ -4167,7 +4167,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;
> -- 
> 2.41.0
> 

Thanks! Queued on nvme-next!

Reviewed-by: Klaus Jensen <k.jensen@samsung.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2024-07-22 11:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-22  9:17 [PATCH 0/2] remove useless type cast Yao Xingtao via
2024-07-22  9:17 ` [PATCH 1/2] mips/loongson3_virt: " Yao Xingtao via
2024-07-22 11:47   ` Peter Maydell
2024-07-22 12:10   ` Philippe Mathieu-Daudé
2024-07-22 21:16   ` Philippe Mathieu-Daudé
2024-07-22  9:17 ` [PATCH 2/2] nvme/ctrl: " Yao Xingtao via
2024-07-22 11:48   ` Peter Maydell
2024-07-22 11:52   ` Klaus Jensen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zp5IDzX686apM6mH@cormorant.local \
    --to=its@irrelevant.dk \
    --cc=foss@defmacro.it \
    --cc=kbusch@kernel.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=yaoxt.fnst@fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).