All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: fix err_cast.cocci warnings
  2022-03-31 23:42 [ammarfaizi2-block:axboe/linux-block/sock-nolock 7/9] net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock kernel test robot
@ 2022-03-31 23:33 ` kernel test robot
  2022-04-01  1:14     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2022-03-31 23:33 UTC (permalink / raw)
  To: Jens Axboe; +Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel

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

net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Generated by: scripts/coccinelle/api/err_cast.cocci

Fixes: 3af464ccde38 ("net: add __sys_socket_file()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/sock-nolock
head:   8698873371093e22f708c2cf3a31f4dc2caab84f
commit: 3af464ccde389a5df95af3e221d098ac34d4606f [7/9] net: add __sys_socket_file()
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago

 net/socket.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/socket.c
+++ b/net/socket.c
@@ -1568,7 +1568,7 @@ struct file *__sys_socket_direct(int fam
 
 	sock = __sys_socket_create(family, type, protocol);
 	if (IS_ERR(sock))
-		return ERR_PTR(PTR_ERR(sock));
+		return ERR_CAST(sock);
 
 	flags = type & ~SOCK_TYPE_MASK;
 	if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))

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

* [ammarfaizi2-block:axboe/linux-block/sock-nolock 7/9] net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock
@ 2022-03-31 23:42 kernel test robot
  2022-03-31 23:33 ` [PATCH] net: fix err_cast.cocci warnings kernel test robot
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2022-03-31 23:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/sock-nolock
head:   8698873371093e22f708c2cf3a31f4dc2caab84f
commit: 3af464ccde389a5df95af3e221d098ac34d4606f [7/9] net: add __sys_socket_file()
config: x86_64-randconfig-c022 (https://download.01.org/0day-ci/archive/20220401/202204010757.kWpiiHMi-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock

Please review and possibly fold the followup patch.

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: [PATCH] net: fix err_cast.cocci warnings
  2022-03-31 23:33 ` [PATCH] net: fix err_cast.cocci warnings kernel test robot
@ 2022-04-01  1:14     ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2022-04-01  1:14 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel

On 3/31/22 5:33 PM, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
> 
> net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock
> 
> 
>  Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Thanks - since I haven't even posted this yet, I'm just going to
fold in the patch.

-- 
Jens Axboe


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

* Re: [PATCH] net: fix err_cast.cocci warnings
@ 2022-04-01  1:14     ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2022-04-01  1:14 UTC (permalink / raw)
  To: kbuild-all

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

On 3/31/22 5:33 PM, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
> 
> net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock
> 
> 
>  Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Thanks - since I haven't even posted this yet, I'm just going to
fold in the patch.

-- 
Jens Axboe

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

* [PATCH] net: fix err_cast.cocci warnings
  2021-04-02 14:06 [PATCH net-next v8 1/2] net: Add a WWAN subsystem Loic Poulain
@ 2021-04-02 18:03   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-04-02 18:03 UTC (permalink / raw)
  To: Loic Poulain, gregkh, kuba, davem
  Cc: kbuild-all, linux-arm-msm, aleksander, linux-kernel, netdev,
	bjorn.andersson, manivannan.sadhasivam, Loic Poulain

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

drivers/net/wwan/wwan_core.c:208:9-16: WARNING: ERR_CAST can be used with wwandev


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Generated by: scripts/coccinelle/api/err_cast.cocci

CC: Loic Poulain <loic.poulain@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Loic-Poulain/net-Add-a-WWAN-subsystem/20210402-220002
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git bd78980be1a68d14524c51c4b4170782fada622b

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

--- a/drivers/net/wwan/wwan_core.c
+++ b/drivers/net/wwan/wwan_core.c
@@ -205,7 +205,7 @@ struct wwan_port *wwan_create_port(struc
 	 */
 	wwandev = wwan_create_dev(parent);
 	if (IS_ERR(wwandev))
-		return ERR_PTR(PTR_ERR(wwandev));
+		return ERR_CAST(wwandev);
 
 	/* A port is exposed as character device, get a minor */
 	minor = ida_alloc_range(&minors, 0, WWAN_MAX_MINORS - 1, GFP_KERNEL);

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

* [PATCH] net: fix err_cast.cocci warnings
@ 2021-04-02 18:03   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-04-02 18:03 UTC (permalink / raw)
  To: kbuild-all

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

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

drivers/net/wwan/wwan_core.c:208:9-16: WARNING: ERR_CAST can be used with wwandev


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Generated by: scripts/coccinelle/api/err_cast.cocci

CC: Loic Poulain <loic.poulain@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Loic-Poulain/net-Add-a-WWAN-subsystem/20210402-220002
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git bd78980be1a68d14524c51c4b4170782fada622b

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

--- a/drivers/net/wwan/wwan_core.c
+++ b/drivers/net/wwan/wwan_core.c
@@ -205,7 +205,7 @@ struct wwan_port *wwan_create_port(struc
 	 */
 	wwandev = wwan_create_dev(parent);
 	if (IS_ERR(wwandev))
-		return ERR_PTR(PTR_ERR(wwandev));
+		return ERR_CAST(wwandev);
 
 	/* A port is exposed as character device, get a minor */
 	minor = ida_alloc_range(&minors, 0, WWAN_MAX_MINORS - 1, GFP_KERNEL);

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

end of thread, other threads:[~2022-04-01  1:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 23:42 [ammarfaizi2-block:axboe/linux-block/sock-nolock 7/9] net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock kernel test robot
2022-03-31 23:33 ` [PATCH] net: fix err_cast.cocci warnings kernel test robot
2022-04-01  1:14   ` Jens Axboe
2022-04-01  1:14     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2021-04-02 14:06 [PATCH net-next v8 1/2] net: Add a WWAN subsystem Loic Poulain
2021-04-02 18:03 ` [PATCH] net: fix err_cast.cocci warnings kernel test robot
2021-04-02 18:03   ` 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.