All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: usbip: fix odd_ptr_err.cocci warnings
@ 2021-02-19 17:10 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2021-02-19 17:10 UTC (permalink / raw)
  To: Tetsuo Handa
  Cc: Valentina Manea, Shuah Khan, Greg Kroah-Hartman, linux-usb,
	linux-kernel, kbuild-all

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

PTR_ERR should access the value just tested by IS_ERR

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

CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20210219-175233/Tetsuo-Handa/usb-usbip-serialize-attach-detach-operations/20210219-083847
head:   32963105fe23b600644ac10f0f9a42124a289990
commit: 32963105fe23b600644ac10f0f9a42124a289990 usb: usbip: serialize attach/detach operations
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

The above link doesn't work for me, so I don't know whether the goto label
is correct.

 usbip_common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -775,7 +775,7 @@ int usbip_prepare_threads(struct usbip_t
 	}
 	tx = kthread_create(tx_fn, ud, tx_name);
 	if (IS_ERR(tx)) {
-		err = PTR_ERR(rx);
+		err = PTR_ERR(tx);
 		goto out_rx;
 	}
 	uti->tcp_socket = socket;

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

* [PATCH] usb: usbip: fix odd_ptr_err.cocci warnings
@ 2021-02-19 17:10 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2021-02-19 17:10 UTC (permalink / raw)
  To: kbuild-all

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

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

PTR_ERR should access the value just tested by IS_ERR

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

CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20210219-175233/Tetsuo-Handa/usb-usbip-serialize-attach-detach-operations/20210219-083847
head:   32963105fe23b600644ac10f0f9a42124a289990
commit: 32963105fe23b600644ac10f0f9a42124a289990 usb: usbip: serialize attach/detach operations
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

The above link doesn't work for me, so I don't know whether the goto label
is correct.

 usbip_common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -775,7 +775,7 @@ int usbip_prepare_threads(struct usbip_t
 	}
 	tx = kthread_create(tx_fn, ud, tx_name);
 	if (IS_ERR(tx)) {
-		err = PTR_ERR(rx);
+		err = PTR_ERR(tx);
 		goto out_rx;
 	}
 	uti->tcp_socket = socket;

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

* [PATCH] usb: usbip: fix odd_ptr_err.cocci warnings
  2021-02-19 12:41 drivers/usb/usbip/usbip_common.c:777:5-11: inconsistent IS_ERR and PTR_ERR on line 778 kernel test robot
@ 2021-02-19 12:41 ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-02-19 12:41 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
CC: 0day robot <lkp@intel.com>
CC: Valentina Manea <valentina.manea.m@gmail.com>
CC: Shuah Khan <skhan@linuxfoundation.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: linux-usb(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

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

drivers/usb/usbip/usbip_common.c:777:5-11: inconsistent IS_ERR and PTR_ERR on line 778.

 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

CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20210219-175233/Tetsuo-Handa/usb-usbip-serialize-attach-detach-operations/20210219-083847
head:   32963105fe23b600644ac10f0f9a42124a289990
commit: 32963105fe23b600644ac10f0f9a42124a289990 usb: usbip: serialize attach/detach operations
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

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

 usbip_common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -775,7 +775,7 @@ int usbip_prepare_threads(struct usbip_t
 	}
 	tx = kthread_create(tx_fn, ud, tx_name);
 	if (IS_ERR(tx)) {
-		err = PTR_ERR(rx);
+		err = PTR_ERR(tx);
 		goto out_rx;
 	}
 	uti->tcp_socket = socket;

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

end of thread, other threads:[~2021-02-19 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 17:10 [PATCH] usb: usbip: fix odd_ptr_err.cocci warnings Julia Lawall
2021-02-19 17:10 ` Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2021-02-19 12:41 drivers/usb/usbip/usbip_common.c:777:5-11: inconsistent IS_ERR and PTR_ERR on line 778 kernel test robot
2021-02-19 12:41 ` [PATCH] usb: usbip: 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.