All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0
@ 2022-06-12 20:34   ` Colin Ian King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin Ian King @ 2022-06-12 20:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andi Shyti, Mark Brown, Alim Akhtar,
	linux-spi, linux-samsung-soc, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

There are pointers being set to null using use. Use NULL instead.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/spi/spi-s3c64xx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 0ce58105dbac..819b660dae82 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -354,7 +354,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 	sdd->rx_dma.ch = dma_request_chan(&sdd->pdev->dev, "rx");
 	if (IS_ERR(sdd->rx_dma.ch)) {
 		dev_err(&sdd->pdev->dev, "Failed to get RX DMA channel\n");
-		sdd->rx_dma.ch = 0;
+		sdd->rx_dma.ch = NULL;
 		return 0;
 	}
 
@@ -362,8 +362,8 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 	if (IS_ERR(sdd->tx_dma.ch)) {
 		dev_err(&sdd->pdev->dev, "Failed to get TX DMA channel\n");
 		dma_release_channel(sdd->rx_dma.ch);
-		sdd->tx_dma.ch = 0;
-		sdd->rx_dma.ch = 0;
+		sdd->tx_dma.ch = NULL;
+		sdd->rx_dma.ch = NULL;
 		return 0;
 	}
 
@@ -808,8 +808,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
 	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 status;
-- 
2.35.3


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

* [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0
@ 2022-06-12 20:34   ` Colin Ian King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin Ian King @ 2022-06-12 20:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andi Shyti, Mark Brown, Alim Akhtar,
	linux-spi, linux-samsung-soc, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

There are pointers being set to null using use. Use NULL instead.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/spi/spi-s3c64xx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 0ce58105dbac..819b660dae82 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -354,7 +354,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 	sdd->rx_dma.ch = dma_request_chan(&sdd->pdev->dev, "rx");
 	if (IS_ERR(sdd->rx_dma.ch)) {
 		dev_err(&sdd->pdev->dev, "Failed to get RX DMA channel\n");
-		sdd->rx_dma.ch = 0;
+		sdd->rx_dma.ch = NULL;
 		return 0;
 	}
 
@@ -362,8 +362,8 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 	if (IS_ERR(sdd->tx_dma.ch)) {
 		dev_err(&sdd->pdev->dev, "Failed to get TX DMA channel\n");
 		dma_release_channel(sdd->rx_dma.ch);
-		sdd->tx_dma.ch = 0;
-		sdd->rx_dma.ch = 0;
+		sdd->tx_dma.ch = NULL;
+		sdd->rx_dma.ch = NULL;
 		return 0;
 	}
 
@@ -808,8 +808,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
 	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 status;
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0
  2022-06-12 20:34   ` Colin Ian King
@ 2022-06-13  4:11     ` Alim Akhtar
  -1 siblings, 0 replies; 6+ messages in thread
From: Alim Akhtar @ 2022-06-13  4:11 UTC (permalink / raw)
  To: 'Colin Ian King', 'Krzysztof Kozlowski',
	'Andi Shyti', 'Mark Brown',
	linux-spi, linux-samsung-soc, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel



>-----Original Message-----
>From: Colin Ian King [mailto:colin.i.king@gmail.com]
>Sent: Monday, June 13, 2022 2:04 AM
>To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; Andi Shyti
><andi@etezian.org>; Mark Brown <broonie@kernel.org>; Alim Akhtar
><alim.akhtar@samsung.com>; linux-spi@vger.kernel.org; linux-samsung-
>soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org
>Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather
>than 0
>
>There are pointers being set to null using use. Use NULL instead.
>
Nit: s/using use / using zero

>Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>---

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

> drivers/spi/spi-s3c64xx.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index
>0ce58105dbac..819b660dae82 100644
>--- a/drivers/spi/spi-s3c64xx.c
>+++ b/drivers/spi/spi-s3c64xx.c
>@@ -354,7 +354,7 @@ static int s3c64xx_spi_prepare_transfer(struct
>spi_master *spi)
> 	sdd->rx_dma.ch = dma_request_chan(&sdd->pdev->dev, "rx");
> 	if (IS_ERR(sdd->rx_dma.ch)) {
> 		dev_err(&sdd->pdev->dev, "Failed to get RX DMA
>channel\n");
>-		sdd->rx_dma.ch = 0;
>+		sdd->rx_dma.ch = NULL;
> 		return 0;
> 	}
>
>@@ -362,8 +362,8 @@ static int s3c64xx_spi_prepare_transfer(struct
>spi_master *spi)
> 	if (IS_ERR(sdd->tx_dma.ch)) {
> 		dev_err(&sdd->pdev->dev, "Failed to get TX DMA
>channel\n");
> 		dma_release_channel(sdd->rx_dma.ch);
>-		sdd->tx_dma.ch = 0;
>-		sdd->rx_dma.ch = 0;
>+		sdd->tx_dma.ch = NULL;
>+		sdd->rx_dma.ch = NULL;
> 		return 0;
> 	}
>
>@@ -808,8 +808,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master
>*master,
> 	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 status;
>--
>2.35.3



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

* RE: [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0
@ 2022-06-13  4:11     ` Alim Akhtar
  0 siblings, 0 replies; 6+ messages in thread
From: Alim Akhtar @ 2022-06-13  4:11 UTC (permalink / raw)
  To: 'Colin Ian King', 'Krzysztof Kozlowski',
	'Andi Shyti', 'Mark Brown',
	linux-spi, linux-samsung-soc, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel



>-----Original Message-----
>From: Colin Ian King [mailto:colin.i.king@gmail.com]
>Sent: Monday, June 13, 2022 2:04 AM
>To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; Andi Shyti
><andi@etezian.org>; Mark Brown <broonie@kernel.org>; Alim Akhtar
><alim.akhtar@samsung.com>; linux-spi@vger.kernel.org; linux-samsung-
>soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org
>Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather
>than 0
>
>There are pointers being set to null using use. Use NULL instead.
>
Nit: s/using use / using zero

>Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>---

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

> drivers/spi/spi-s3c64xx.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index
>0ce58105dbac..819b660dae82 100644
>--- a/drivers/spi/spi-s3c64xx.c
>+++ b/drivers/spi/spi-s3c64xx.c
>@@ -354,7 +354,7 @@ static int s3c64xx_spi_prepare_transfer(struct
>spi_master *spi)
> 	sdd->rx_dma.ch = dma_request_chan(&sdd->pdev->dev, "rx");
> 	if (IS_ERR(sdd->rx_dma.ch)) {
> 		dev_err(&sdd->pdev->dev, "Failed to get RX DMA
>channel\n");
>-		sdd->rx_dma.ch = 0;
>+		sdd->rx_dma.ch = NULL;
> 		return 0;
> 	}
>
>@@ -362,8 +362,8 @@ static int s3c64xx_spi_prepare_transfer(struct
>spi_master *spi)
> 	if (IS_ERR(sdd->tx_dma.ch)) {
> 		dev_err(&sdd->pdev->dev, "Failed to get TX DMA
>channel\n");
> 		dma_release_channel(sdd->rx_dma.ch);
>-		sdd->tx_dma.ch = 0;
>-		sdd->rx_dma.ch = 0;
>+		sdd->tx_dma.ch = NULL;
>+		sdd->rx_dma.ch = NULL;
> 		return 0;
> 	}
>
>@@ -808,8 +808,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master
>*master,
> 	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 status;
>--
>2.35.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0
  2022-06-12 20:34   ` Colin Ian King
@ 2022-06-13 17:24     ` Mark Brown
  -1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-06-13 17:24 UTC (permalink / raw)
  To: linux-arm-kernel, linux-spi, krzysztof.kozlowski,
	linux-samsung-soc, alim.akhtar, Colin Ian King, andi
  Cc: kernel-janitors, linux-kernel

On Sun, 12 Jun 2022 21:34:28 +0100, Colin Ian King wrote:
> There are pointers being set to null using use. Use NULL instead.
> 
> 

Applied to

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

Thanks!

[1/1] spi: s3c64xx: set pointers to null using NULL rather than 0
      commit: 845d3fd8a0aadf5dd97e6d345d3df4bf80099e69

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0
@ 2022-06-13 17:24     ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-06-13 17:24 UTC (permalink / raw)
  To: linux-arm-kernel, linux-spi, krzysztof.kozlowski,
	linux-samsung-soc, alim.akhtar, Colin Ian King, andi
  Cc: kernel-janitors, linux-kernel

On Sun, 12 Jun 2022 21:34:28 +0100, Colin Ian King wrote:
> There are pointers being set to null using use. Use NULL instead.
> 
> 

Applied to

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

Thanks!

[1/1] spi: s3c64xx: set pointers to null using NULL rather than 0
      commit: 845d3fd8a0aadf5dd97e6d345d3df4bf80099e69

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] 6+ messages in thread

end of thread, other threads:[~2022-06-13 19:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220612203434epcas5p3f44780ebc5f34f5fd3f55362cbe21a2e@epcas5p3.samsung.com>
2022-06-12 20:34 ` [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0 Colin Ian King
2022-06-12 20:34   ` Colin Ian King
2022-06-13  4:11   ` Alim Akhtar
2022-06-13  4:11     ` Alim Akhtar
2022-06-13 17:24   ` Mark Brown
2022-06-13 17:24     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.