Commit 3c1fb0ce authored by Shin'ichiro Kawasaki's avatar Shin'ichiro Kawasaki Committed by Keith Busch
Browse files

nvmet: pci-epf: fix DMA channel debug print



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: default avatarShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 511b3b64
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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;