2022-08-08 00:48:01

by Chanho Park

[permalink] [raw]
Subject: [PATCH] spi: s3c64xx: correct dma_chan pointer initialization

Use NULL for dma channel pointer initialization instead of plain integer.

sparse warnings: (new ones prefixed by >>)
>> drivers/spi/spi-s3c64xx.c:387:34: sparse: sparse: Using plain integer as NULL pointer
drivers/spi/spi-s3c64xx.c:388:34: sparse: sparse: Using plain integer as NULL pointer

Reported-by: kernel test robot <[email protected]>
Fixes: 82295bc0d192 ("spi: s3c64xx: move dma_release_channel to unprepare")
Fixes: f52b03c70744 ("spi: s3c64xx: requests spi-dma channel only during data transfer")
Signed-off-by: Chanho Park <[email protected]>
---
drivers/spi/spi-s3c64xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 7f346866614a..651c35dd9124 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -389,8 +389,8 @@ static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi)
if (sdd->rx_dma.ch && sdd->tx_dma.ch) {
dma_release_channel(sdd->rx_dma.ch);
dma_release_channel(sdd->tx_dma.ch);
- sdd->rx_dma.ch = 0;
- sdd->tx_dma.ch = 0;
+ sdd->rx_dma.ch = NULL;
+ sdd->tx_dma.ch = NULL;
}

return 0;
--
2.37.1


2022-08-08 06:12:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] spi: s3c64xx: correct dma_chan pointer initialization

On 08/08/2022 02:48, Chanho Park wrote:
> Use NULL for dma channel pointer initialization instead of plain integer.
>
> sparse warnings: (new ones prefixed by >>)
>>> drivers/spi/spi-s3c64xx.c:387:34: sparse: sparse: Using plain integer as NULL pointer
> drivers/spi/spi-s3c64xx.c:388:34: sparse: sparse: Using plain integer as NULL pointer
>


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof

2022-08-08 09:47:21

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH] spi: s3c64xx: correct dma_chan pointer initialization

Hi Chanho,

On Mon, Aug 08, 2022 at 09:48:51AM +0900, Chanho Park wrote:
> Use NULL for dma channel pointer initialization instead of plain integer.
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/spi/spi-s3c64xx.c:387:34: sparse: sparse: Using plain integer as NULL pointer
> drivers/spi/spi-s3c64xx.c:388:34: sparse: sparse: Using plain integer as NULL pointer
>
> Reported-by: kernel test robot <[email protected]>
> Fixes: 82295bc0d192 ("spi: s3c64xx: move dma_release_channel to unprepare")
> Fixes: f52b03c70744 ("spi: s3c64xx: requests spi-dma channel only during data transfer")
> Signed-off-by: Chanho Park <[email protected]>

Reviewed-by: Andi Shyti <[email protected]>

Thanks,
Andi

2022-08-15 15:51:01

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] spi: s3c64xx: correct dma_chan pointer initialization

On Mon, 8 Aug 2022 09:48:51 +0900, Chanho Park wrote:
> Use NULL for dma channel pointer initialization instead of plain integer.
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/spi/spi-s3c64xx.c:387:34: sparse: sparse: Using plain integer as NULL pointer
> drivers/spi/spi-s3c64xx.c:388:34: sparse: sparse: Using plain integer as NULL pointer
>
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: s3c64xx: correct dma_chan pointer initialization
commit: dad57a510db9423a4128ae6565854e999cebac51

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark