lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Jun 2022 09:41:09 +0530
From:   "Alim Akhtar" <alim.akhtar@...sung.com>
To:     "'Colin Ian King'" <colin.i.king@...il.com>,
        "'Krzysztof Kozlowski'" <krzysztof.kozlowski@...aro.org>,
        "'Andi Shyti'" <andi@...zian.org>,
        "'Mark Brown'" <broonie@...nel.org>, <linux-spi@...r.kernel.org>,
        <linux-samsung-soc@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Cc:     <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH][next] spi: s3c64xx: set pointers to null using NULL
 rather than 0



>-----Original Message-----
>From: Colin Ian King [mailto:colin.i.king@...il.com]
>Sent: Monday, June 13, 2022 2:04 AM
>To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>; Andi Shyti
><andi@...zian.org>; Mark Brown <broonie@...nel.org>; Alim Akhtar
><alim.akhtar@...sung.com>; linux-spi@...r.kernel.org; linux-samsung-
>soc@...r.kernel.org; linux-arm-kernel@...ts.infradead.org
>Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.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@...il.com>
>---

Reviewed-by: Alim Akhtar <alim.akhtar@...sung.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ