All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
@ 2020-06-12 21:22 ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-06-12 21:22 UTC (permalink / raw)
  To: Keerthy; +Cc: Tero Kristo, Herbert Xu, linux-crypto, linux-kernel, kbuild-all

From: kernel test robot <lkp@intel.com>

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 <j-keerthy@ti.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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

--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -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;

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

* [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
@ 2020-06-12 21:22 ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-06-12 21:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

From: kernel test robot <lkp@intel.com>

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 <j-keerthy@ti.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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

--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -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;

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

* Re: [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
  2020-06-12 21:22 ` Julia Lawall
@ 2020-06-18  7:28   ` Herbert Xu
  -1 siblings, 0 replies; 7+ messages in thread
From: Herbert Xu @ 2020-06-18  7:28 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Keerthy, Tero Kristo, linux-crypto, linux-kernel, kbuild-all

On Fri, Jun 12, 2020 at 11:22:02PM +0200, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
> 
> 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 <j-keerthy@ti.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
> 
> 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,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
@ 2020-06-18  7:28   ` Herbert Xu
  0 siblings, 0 replies; 7+ messages in thread
From: Herbert Xu @ 2020-06-18  7:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

On Fri, Jun 12, 2020 at 11:22:02PM +0200, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
> 
> 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 <j-keerthy@ti.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
> 
> 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,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
  2020-06-18  7:28   ` Herbert Xu
@ 2020-06-18  7:56     ` Tero Kristo
  -1 siblings, 0 replies; 7+ messages in thread
From: Tero Kristo @ 2020-06-18  7:56 UTC (permalink / raw)
  To: Herbert Xu, Julia Lawall; +Cc: Keerthy, linux-crypto, linux-kernel, kbuild-all

On 18/06/2020 10:28, Herbert Xu wrote:
> On Fri, Jun 12, 2020 at 11:22:02PM +0200, Julia Lawall wrote:
>> From: kernel test robot <lkp@intel.com>
>>
>> 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 <j-keerthy@ti.com>
>> Signed-off-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
>> ---
>>
>> 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.

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

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

* Re: [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
@ 2020-06-18  7:56     ` Tero Kristo
  0 siblings, 0 replies; 7+ messages in thread
From: Tero Kristo @ 2020-06-18  7:56 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

On 18/06/2020 10:28, Herbert Xu wrote:
> On Fri, Jun 12, 2020 at 11:22:02PM +0200, Julia Lawall wrote:
>> From: kernel test robot <lkp@intel.com>
>>
>> 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 <j-keerthy@ti.com>
>> Signed-off-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
>> ---
>>
>> 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.

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

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

* [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
  2020-06-12 19:16 [ti:ti-linux-5.4.y 2369/7050] drivers/crypto/sa2ul.c:1253:5-11: inconsistent IS_ERR and PTR_ERR on line 1255 kernel test robot
@ 2020-06-12 19:16 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-06-12 19:16 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1974 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Keerthy <j-keerthy@ti.com>
CC: Tero Kristo <t-kristo@ti.com>
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: linux-crypto(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/crypto/sa2ul.c:1253:5-11: inconsistent IS_ERR and PTR_ERR on line 1255.
drivers/crypto/sa2ul.c:1261:5-11: inconsistent IS_ERR and PTR_ERR on line 1262.

 PTR_ERR should access the value just tested by IS_ERR

Semantic patch information:
 There can be false positives in the patch case, where it is the call to
 IS_ERR that is wrong.

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

Fixes: 5b8516f3bedb ("crypto: sa2ul: Add crypto driver")
CC: Keerthy <j-keerthy@ti.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

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

Please take the patch only if it's a positive warning. Thanks!

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

--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -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;

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

end of thread, other threads:[~2020-06-18  7:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 21:22 [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings Julia Lawall
2020-06-12 21:22 ` Julia Lawall
2020-06-18  7:28 ` Herbert Xu
2020-06-18  7:28   ` Herbert Xu
2020-06-18  7:56   ` Tero Kristo
2020-06-18  7:56     ` Tero Kristo
  -- strict thread matches above, loose matches on Subject: below --
2020-06-12 19:16 [ti:ti-linux-5.4.y 2369/7050] drivers/crypto/sa2ul.c:1253:5-11: inconsistent IS_ERR and PTR_ERR on line 1255 kernel test robot
2020-06-12 19:16 ` [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings kernel test robot

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.