dmaengine: fsl-edma: refactor chan_name setup and safety
authorFrank Li <Frank.Li@nxp.com>
Mon, 21 Aug 2023 16:16:14 +0000 (12:16 -0400)
committerVinod Koul <vkoul@kernel.org>
Tue, 22 Aug 2023 14:41:03 +0000 (20:11 +0530)
commit9b05554c5ca6829a60c610191d45f244d8726e95
treeb1fd9b72e132215fee1a13b8b7d7a0f6ed75912f
parentf5b3ba52f36adcda7801fba99c414975f19c85d4
dmaengine: fsl-edma: refactor chan_name setup and safety

Relocated the setup of chan_name from setup_irq() to fsl_chan init. This
change anticipates its future use in various locations.

For increased safety, sprintf has been replaced with snprintf. In addition,
The size of the fsl_chan->name[] array was expanded from 16 to 32.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20230821161617.2142561-10-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/fsl-edma-common.h
drivers/dma/fsl-edma-main.c