mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Cong Wang <cong.wang@bytedance.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [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
Date: Tue, 28 Sep 2021 07:23:20 +0800	[thread overview]
Message-ID: <202109280713.W0cGPnJH-lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2021-09-27 23:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202109280713.W0cGPnJH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cong.wang@bytedance.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®