linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alim Akhtar" <alim.akhtar@samsung.com>
To: "'Colin Ian King'" <colin.i.king@gmail.com>,
	"'Krzysztof Kozlowski'" <krzysztof.kozlowski@linaro.org>,
	"'Andi Shyti'" <andi@etezian.org>,
	"'Mark Brown'" <broonie@kernel.org>, <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: RE: [PATCH][next] spi: s3c64xx: set pointers to null using NULL rather than 0
Date: Mon, 13 Jun 2022 09:41:09 +0530	[thread overview]
Message-ID: <006901d87edb$9dbd5c00$d9381400$@samsung.com> (raw)
In-Reply-To: <20220612203428.2754823-1-colin.i.king@gmail.com>



>-----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



  reply	other threads:[~2022-06-13  4:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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-13  4:11   ` Alim Akhtar [this message]
2022-06-13 17:24   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='006901d87edb$9dbd5c00$d9381400$@samsung.com' \
    --to=alim.akhtar@samsung.com \
    --cc=andi@etezian.org \
    --cc=broonie@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).