Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: linux-nvme@lists.infradead.org, Keith Busch <kbusch@kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Damien Le Moal <dlemoal@kernel.org>
Subject: Re: [PATCH v2] nvmet: pci-epf: fix DMA channel debug print
Date: Thu, 9 Oct 2025 14:45:58 +0200	[thread overview]
Message-ID: <aOeuhoM3J-EHFR9b@ryzen> (raw)
In-Reply-To: <20250913065350.160301-1-shinichiro.kawasaki@wdc.com>

On Sat, Sep 13, 2025 at 03:53:50PM +0900, Shin'ichiro Kawasaki wrote:
> Currently, nvmet_pci_epf_init_dma() has two dev_dbg() calls intended to
> print debug information about the DMA channels for RX and TX. However,
> both calls mistakenly are made for the TX channel. Fix it by referreing
> to 'nvme_epf->rx_chan' and 'nvme_epf->tx_chan' and instead of the local
> variable 'chan'.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> ---
> Changes from v1:
> * Refer to nvme_epf->dma_[rt]x_chan and do not move the dev_dbg() call
> 
>  drivers/nvme/target/pci-epf.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
> index 2e78397a7373..4bfecb0c7ee4 100644
> --- a/drivers/nvme/target/pci-epf.c
> +++ b/drivers/nvme/target/pci-epf.c
> @@ -320,12 +320,14 @@ static void nvmet_pci_epf_init_dma(struct nvmet_pci_epf *nvme_epf)
>  	nvme_epf->dma_enabled = true;
>  
>  	dev_dbg(dev, "Using DMA RX channel %s, maximum segment size %u B\n",
> -		dma_chan_name(chan),
> -		dma_get_max_seg_size(dmaengine_get_dma_device(chan)));
> +		dma_chan_name(nvme_epf->dma_rx_chan),
> +		dma_get_max_seg_size(dmaengine_get_dma_device(nvme_epf->
> +							      dma_rx_chan)));
>  
>  	dev_dbg(dev, "Using DMA TX channel %s, maximum segment size %u B\n",
> -		dma_chan_name(chan),
> -		dma_get_max_seg_size(dmaengine_get_dma_device(chan)));
> +		dma_chan_name(nvme_epf->dma_tx_chan),
> +		dma_get_max_seg_size(dmaengine_get_dma_device(nvme_epf->
> +							      dma_tx_chan)));
>  
>  	return;
>  
> -- 
> 2.51.0

Gentle ping


Kind regards,
Niklas


  parent reply	other threads:[~2025-10-09 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-13  6:53 [PATCH v2] nvmet: pci-epf: fix DMA channel debug print Shin'ichiro Kawasaki
2025-09-13  6:58 ` Damien Le Moal
2025-10-09 12:45 ` Niklas Cassel [this message]
2025-10-09 15:05 ` Keith Busch

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=aOeuhoM3J-EHFR9b@ryzen \
    --to=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hch@infradead.org \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=shinichiro.kawasaki@wdc.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