Skip to contentSkip to conversation

crypto: sa2ul: fix odd_ptr_err.cocci warnings

PATCH In review Julia Lawall 3 participants 3 messages Jun 12, 2020 – Jun 18, 2020 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: sa2ul: fix odd_ptr_err.cocci warnings

From: kernel test robot <[email protected]>

PTR_ERR should normally access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes 5b8516f3bedb ("crypto: sa2ul: Add crypto driver")
CC Keerthy <[email protected]>

---

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head:   134a1b1f8814115e2dd115b67082321bf9e63cc1
commit: 5b8516f3bedb3e1c273e7747b6e4a85c6e47907a [2369/7050] crypto: sa2ul: Add crypto driver

:::::: branch date: 3 hours ago
:::::: commit date: 5 months ago

 sa2ul.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/sa2ul.c +2 -2
@@ -1252,14 +1252,14 @@ static int sa_dma_init(struct sa_crypto_
 	dd->dma_rx2 = dma_request_chan(dd->dev, "rx2");
 	if (IS_ERR(dd->dma_rx2)) {
 		dma_release_channel(dd->dma_rx1);
-		if (PTR_ERR(dd->dma_rx1) != -EPROBE_DEFER)
+		if (PTR_ERR(dd->dma_rx2) != -EPROBE_DEFER)
 			dev_err(dd->dev, "Unable to request rx2 DMA channel\n");
 		return PTR_ERR(dd->dma_rx2);
 	}
 
 	dd->dma_tx = dma_request_chan(dd->dev, "tx");
 	if (IS_ERR(dd->dma_tx)) {
-		if (PTR_ERR(dd->dma_rx1) != -EPROBE_DEFER)
+		if (PTR_ERR(dd->dma_tx) != -EPROBE_DEFER)
 			dev_err(dd->dev, "Unable to request tx DMA channel\n");
 		ret = PTR_ERR(dd->dma_tx);
 		goto err_dma_tx;
maintainer
#1 lore raw
Quoted 12 lines · Julia Lawall

From: kernel test robot <[email protected]>

PTR_ERR should normally access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes 5b8516f3bedb ("crypto: sa2ul: Add crypto driver")
CC Keerthy <[email protected]>

---

Quoted 8 lines
tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head:   134a1b1f8814115e2dd115b67082321bf9e63cc1
commit: 5b8516f3bedb3e1c273e7747b6e4a85c6e47907a [2369/7050] crypto: sa2ul: Add crypto driver

:::::: branch date: 3 hours ago
:::::: commit date: 5 months ago

 sa2ul.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

This driver does not exist in the cryptodev tree.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
Quoted 19 lines · Herbert Xu
Quoted 18 lines · Julia Lawall

From: kernel test robot <[email protected]>

PTR_ERR should normally access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes 5b8516f3bedb ("crypto: sa2ul: Add crypto driver")
CC Keerthy <[email protected]>

---

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head:   134a1b1f8814115e2dd115b67082321bf9e63cc1
commit: 5b8516f3bedb3e1c273e7747b6e4a85c6e47907a [2369/7050] crypto: sa2ul: Add crypto driver

:::::: branch date: 3 hours ago
:::::: commit date: 5 months ago

Quoted 4 lines
Quoted 2 lines
  sa2ul.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

This driver does not exist in the cryptodev tree.

Yeah, this is old codebase which only exist in TI internal tree at the moment, the driver posted upstream has seen considerable evolution (and is under review atm.)

-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki