public inbox for [email protected]
 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; 3+ 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 <[email protected]>

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 <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

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] 3+ 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; 3+ 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/[email protected]/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 <[email protected]>


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] 3+ 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; 3+ 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 <[email protected]>
> 
> 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] 3+ messages in thread

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

Thread overview: 3+ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox