mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: stm32: Use NULL instead of 0 for pointer
@ 2026-02-16  8:58 Krzysztof Kozlowski
  2026-02-17  9:11 ` [Linux-stm32] " Amelie Delaunay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-16  8:58 UTC (permalink / raw)
  To: Alain Volmat, Mark Brown, Maxime Coquelin, Alexandre Torgue,
	linux-spi, linux-stm32, linux-arm-kernel, linux-kernel
  Cc: Krzysztof Kozlowski

Pointers should use NULL instead of explicit '0', as pointed out by
sparse:

  spi-stm32.c:1659:65: warning: Using plain integer as NULL pointer

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/spi/spi-stm32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index b99de8c4cc99..38f6bba38b07 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1656,7 +1656,7 @@ static int stm32_spi_transfer_one_dma(struct stm32_spi *spi,
 			ret = stm32_spi_prepare_rx_dma_mdma_chaining(spi, xfer, &rx_dma_conf,
 								     &rx_dma_desc, &rx_mdma_desc);
 			if (ret) { /* RX DMA MDMA chaining not possible, fallback to DMA only */
-				rx_dma_conf.peripheral_config = 0;
+				rx_dma_conf.peripheral_config = NULL;
 				rx_dma_desc = NULL;
 			}
 		}
-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-stm32] [PATCH] spi: stm32: Use NULL instead of 0 for pointer
  2026-02-16  8:58 [PATCH] spi: stm32: Use NULL instead of 0 for pointer Krzysztof Kozlowski
@ 2026-02-17  9:11 ` Amelie Delaunay
  2026-02-24  9:38 ` Alain Volmat
  2026-02-25 19:07 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Amelie Delaunay @ 2026-02-17  9:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Alain Volmat, Mark Brown, Maxime Coquelin,
	Alexandre Torgue, linux-spi, linux-stm32, linux-arm-kernel,
	linux-kernel


On 2/16/26 09:58, Krzysztof Kozlowski wrote:
> Pointers should use NULL instead of explicit '0', as pointed out by
> sparse:
> 
>    spi-stm32.c:1659:65: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>


Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>

Thank you for providing the patch to fix this warning.

Regards,
Amelie

> ---
>   drivers/spi/spi-stm32.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
> index b99de8c4cc99..38f6bba38b07 100644
> --- a/drivers/spi/spi-stm32.c
> +++ b/drivers/spi/spi-stm32.c
> @@ -1656,7 +1656,7 @@ static int stm32_spi_transfer_one_dma(struct stm32_spi *spi,
>   			ret = stm32_spi_prepare_rx_dma_mdma_chaining(spi, xfer, &rx_dma_conf,
>   								     &rx_dma_desc, &rx_mdma_desc);
>   			if (ret) { /* RX DMA MDMA chaining not possible, fallback to DMA only */
> -				rx_dma_conf.peripheral_config = 0;
> +				rx_dma_conf.peripheral_config = NULL;
>   				rx_dma_desc = NULL;
>   			}
>   		}


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] spi: stm32: Use NULL instead of 0 for pointer
  2026-02-16  8:58 [PATCH] spi: stm32: Use NULL instead of 0 for pointer Krzysztof Kozlowski
  2026-02-17  9:11 ` [Linux-stm32] " Amelie Delaunay
@ 2026-02-24  9:38 ` Alain Volmat
  2026-02-25 19:07 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Alain Volmat @ 2026-02-24  9:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Mark Brown, Maxime Coquelin, Alexandre Torgue, linux-spi,
	linux-stm32, linux-arm-kernel, linux-kernel

Hi Krzysztof,

thanks for this patch.

On Mon, Feb 16, 2026 at 09:58:17AM +0100, Krzysztof Kozlowski wrote:
> Pointers should use NULL instead of explicit '0', as pointed out by
> sparse:
> 
>   spi-stm32.c:1659:65: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
>  drivers/spi/spi-stm32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
> index b99de8c4cc99..38f6bba38b07 100644
> --- a/drivers/spi/spi-stm32.c
> +++ b/drivers/spi/spi-stm32.c
> @@ -1656,7 +1656,7 @@ static int stm32_spi_transfer_one_dma(struct stm32_spi *spi,
>  			ret = stm32_spi_prepare_rx_dma_mdma_chaining(spi, xfer, &rx_dma_conf,
>  								     &rx_dma_desc, &rx_mdma_desc);
>  			if (ret) { /* RX DMA MDMA chaining not possible, fallback to DMA only */
> -				rx_dma_conf.peripheral_config = 0;
> +				rx_dma_conf.peripheral_config = NULL;
>  				rx_dma_desc = NULL;
>  			}
>  		}

Reviewed-by: Alain Volmat <alain.volmat@foss.st.com>

Regards,
Alain

> -- 
> 2.51.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] spi: stm32: Use NULL instead of 0 for pointer
  2026-02-16  8:58 [PATCH] spi: stm32: Use NULL instead of 0 for pointer Krzysztof Kozlowski
  2026-02-17  9:11 ` [Linux-stm32] " Amelie Delaunay
  2026-02-24  9:38 ` Alain Volmat
@ 2026-02-25 19:07 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2026-02-25 19:07 UTC (permalink / raw)
  To: Alain Volmat, Maxime Coquelin, Alexandre Torgue, linux-spi,
	linux-stm32, linux-arm-kernel, linux-kernel, Krzysztof Kozlowski

On Mon, 16 Feb 2026 09:58:17 +0100, Krzysztof Kozlowski wrote:
> Pointers should use NULL instead of explicit '0', as pointed out by
> sparse:
> 
>   spi-stm32.c:1659:65: warning: 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: stm32: Use NULL instead of 0 for pointer
      commit: 5e897a498a6b45145350e9de5e4753e9eee7d4f6

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-25 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-16  8:58 [PATCH] spi: stm32: Use NULL instead of 0 for pointer Krzysztof Kozlowski
2026-02-17  9:11 ` [Linux-stm32] " Amelie Delaunay
2026-02-24  9:38 ` Alain Volmat
2026-02-25 19:07 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®