All of lore.kernel.org
 help / color / mirror / Atom feed
* [congwang:bpf2 3/4] net/core/skmsg.c:482:38: warning: passing argument 1 of 'sk_psock_get_checked' discards 'const' qualifier from pointer target type
@ 2021-09-27 23:23 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-27 23:23 UTC (permalink / raw)
  To: Cong Wang; +Cc: kbuild-all, linux-kernel

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

tree:   https://github.com/congwang/linux.git bpf2
head:   ec3836e59604af89a5f07045ea7a3a1f60ff2cf4
commit: 5417d71bbf55e2a31ceba94cc0d1e4912354c67e [3/4] net: implement ->sock_is_readable for UDP and AF_UNIX
config: openrisc-buildonly-randconfig-r006-20210927 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/congwang/linux/commit/5417d71bbf55e2a31ceba94cc0d1e4912354c67e
        git remote add congwang https://github.com/congwang/linux.git
        git fetch --no-tags congwang bpf2
        git checkout 5417d71bbf55e2a31ceba94cc0d1e4912354c67e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc 

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

All warnings (new ones prefixed by >>):

   net/core/skmsg.c: In function 'sk_msg_is_readable':
>> net/core/skmsg.c:482:38: warning: passing argument 1 of 'sk_psock_get_checked' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     482 |         psock = sk_psock_get_checked(sk);
         |                                      ^~
   In file included from net/core/skmsg.c:4:
   include/linux/skmsg.h:456:66: note: expected 'struct sock *' but argument is of type 'const struct sock *'
     456 | static inline struct sk_psock *sk_psock_get_checked(struct sock *sk)
         |                                                     ~~~~~~~~~~~~~^~
>> net/core/skmsg.c:486:22: warning: passing argument 1 of 'sk_psock_put' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     486 |         sk_psock_put(sk, psock);
         |                      ^~
   In file included from net/core/skmsg.c:4:
   include/linux/skmsg.h:478:46: note: expected 'struct sock *' but argument is of type 'const struct sock *'
     478 | static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock)
         |                                 ~~~~~~~~~~~~~^~


vim +482 net/core/skmsg.c

   476	
   477	bool sk_msg_is_readable(const struct sock *sk)
   478	{
   479		struct sk_psock *psock;
   480		bool empty = true;
   481	
 > 482		psock = sk_psock_get_checked(sk);
   483		if (IS_ERR_OR_NULL(psock))
   484			return false;
   485		empty = sk_psock_queue_empty(psock);
 > 486		sk_psock_put(sk, psock);
   487		return !empty;
   488	}
   489	EXPORT_SYMBOL_GPL(skmsg_is_readable);
   490	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35133 bytes --]

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

* [congwang:bpf2 3/4] net/core/skmsg.c:482:38: warning: passing argument 1 of 'sk_psock_get_checked' discards 'const' qualifier from pointer target type
@ 2021-09-27 23:23 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-27 23:23 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/congwang/linux.git bpf2
head:   ec3836e59604af89a5f07045ea7a3a1f60ff2cf4
commit: 5417d71bbf55e2a31ceba94cc0d1e4912354c67e [3/4] net: implement ->sock_is_readable for UDP and AF_UNIX
config: openrisc-buildonly-randconfig-r006-20210927 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/congwang/linux/commit/5417d71bbf55e2a31ceba94cc0d1e4912354c67e
        git remote add congwang https://github.com/congwang/linux.git
        git fetch --no-tags congwang bpf2
        git checkout 5417d71bbf55e2a31ceba94cc0d1e4912354c67e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc 

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

All warnings (new ones prefixed by >>):

   net/core/skmsg.c: In function 'sk_msg_is_readable':
>> net/core/skmsg.c:482:38: warning: passing argument 1 of 'sk_psock_get_checked' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     482 |         psock = sk_psock_get_checked(sk);
         |                                      ^~
   In file included from net/core/skmsg.c:4:
   include/linux/skmsg.h:456:66: note: expected 'struct sock *' but argument is of type 'const struct sock *'
     456 | static inline struct sk_psock *sk_psock_get_checked(struct sock *sk)
         |                                                     ~~~~~~~~~~~~~^~
>> net/core/skmsg.c:486:22: warning: passing argument 1 of 'sk_psock_put' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     486 |         sk_psock_put(sk, psock);
         |                      ^~
   In file included from net/core/skmsg.c:4:
   include/linux/skmsg.h:478:46: note: expected 'struct sock *' but argument is of type 'const struct sock *'
     478 | static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock)
         |                                 ~~~~~~~~~~~~~^~


vim +482 net/core/skmsg.c

   476	
   477	bool sk_msg_is_readable(const struct sock *sk)
   478	{
   479		struct sk_psock *psock;
   480		bool empty = true;
   481	
 > 482		psock = sk_psock_get_checked(sk);
   483		if (IS_ERR_OR_NULL(psock))
   484			return false;
   485		empty = sk_psock_queue_empty(psock);
 > 486		sk_psock_put(sk, psock);
   487		return !empty;
   488	}
   489	EXPORT_SYMBOL_GPL(skmsg_is_readable);
   490	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35133 bytes --]

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

end of thread, other threads:[~2021-09-27 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 23:23 [congwang:bpf2 3/4] net/core/skmsg.c:482:38: warning: passing argument 1 of 'sk_psock_get_checked' discards 'const' qualifier from pointer target type kernel test robot
2021-09-27 23:23 ` 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.