All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Abhinav Jain <jain.abhinav177@gmail.com>,
	idryomov@gmail.com, xiubli@redhat.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	ceph-devel@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com,
	Abhinav Jain <jain.abhinav177@gmail.com>
Subject: Re: [PATCH net v2] libceph: Make the arguments const as per the TODO
Date: Mon, 12 Aug 2024 23:26:15 +0800	[thread overview]
Message-ID: <202408121938.QL7KtnzW-lkp@intel.com> (raw)
In-Reply-To: <20240811205509.1089027-1-jain.abhinav177@gmail.com>

Hi Abhinav,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Abhinav-Jain/libceph-Make-the-arguments-const-as-per-the-TODO/20240812-045647
base:   net/main
patch link:    https://lore.kernel.org/r/20240811205509.1089027-1-jain.abhinav177%40gmail.com
patch subject: [PATCH net v2] libceph: Make the arguments const as per the TODO
config: i386-buildonly-randconfig-002-20240812 (https://download.01.org/0day-ci/archive/20240812/202408121938.QL7KtnzW-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240812/202408121938.QL7KtnzW-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408121938.QL7KtnzW-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/ceph/crypto.c:93:19: error: passing 'const void **' to parameter of type 'void **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      93 |         ceph_decode_need(p, end, 2*sizeof(u16) + sizeof(key->created), bad);
         |                          ^
   include/linux/ceph/decode.h:59:29: note: expanded from macro 'ceph_decode_need'
      59 |                 if (!likely(ceph_has_room(p, end, n)))          \
         |                                           ^
   include/linux/compiler.h:76:40: note: expanded from macro 'likely'
      76 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^
   include/linux/ceph/decode.h:52:41: note: passing argument to parameter 'p' here
      52 | static inline bool ceph_has_room(void **p, void *end, size_t n)
         |                                         ^
>> net/ceph/crypto.c:93:22: error: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      93 |         ceph_decode_need(p, end, 2*sizeof(u16) + sizeof(key->created), bad);
         |                             ^~~
   include/linux/ceph/decode.h:59:32: note: expanded from macro 'ceph_decode_need'
      59 |                 if (!likely(ceph_has_room(p, end, n)))          \
         |                                              ^~~
   include/linux/compiler.h:76:40: note: expanded from macro 'likely'
      76 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^
   include/linux/ceph/decode.h:52:50: note: passing argument to parameter 'end' here
      52 | static inline bool ceph_has_room(void **p, void *end, size_t n)
         |                                                  ^
   net/ceph/crypto.c:94:29: error: passing 'const void **' to parameter of type 'void **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      94 |         key->type = ceph_decode_16(p);
         |                                    ^
   include/linux/ceph/decode.h:31:41: note: passing argument to parameter 'p' here
      31 | static inline u16 ceph_decode_16(void **p)
         |                                         ^
   net/ceph/crypto.c:95:19: error: passing 'const void **' to parameter of type 'void **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      95 |         ceph_decode_copy(p, &key->created, sizeof(key->created));
         |                          ^
   include/linux/ceph/decode.h:43:44: note: passing argument to parameter 'p' here
      43 | static inline void ceph_decode_copy(void **p, void *pv, size_t n)
         |                                            ^
   net/ceph/crypto.c:96:28: error: passing 'const void **' to parameter of type 'void **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      96 |         key->len = ceph_decode_16(p);
         |                                   ^
   include/linux/ceph/decode.h:31:41: note: passing argument to parameter 'p' here
      31 | static inline u16 ceph_decode_16(void **p)
         |                                         ^
   net/ceph/crypto.c:97:19: error: passing 'const void **' to parameter of type 'void **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      97 |         ceph_decode_need(p, end, key->len, bad);
         |                          ^
   include/linux/ceph/decode.h:59:29: note: expanded from macro 'ceph_decode_need'
      59 |                 if (!likely(ceph_has_room(p, end, n)))          \
         |                                           ^
   include/linux/compiler.h:76:40: note: expanded from macro 'likely'
      76 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^
   include/linux/ceph/decode.h:52:41: note: passing argument to parameter 'p' here
      52 | static inline bool ceph_has_room(void **p, void *end, size_t n)
         |                                         ^
   net/ceph/crypto.c:97:22: error: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      97 |         ceph_decode_need(p, end, key->len, bad);
         |                             ^~~
   include/linux/ceph/decode.h:59:32: note: expanded from macro 'ceph_decode_need'
      59 |                 if (!likely(ceph_has_room(p, end, n)))          \
         |                                              ^~~
   include/linux/compiler.h:76:40: note: expanded from macro 'likely'
      76 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^
   include/linux/ceph/decode.h:52:50: note: passing argument to parameter 'end' here
      52 | static inline bool ceph_has_room(void **p, void *end, size_t n)
         |                                                  ^
   net/ceph/crypto.c:98:24: error: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      98 |         ret = set_secret(key, *p);
         |                               ^~
   net/ceph/crypto.c:23:58: note: passing argument to parameter 'buf' here
      23 | static int set_secret(struct ceph_crypto_key *key, void *buf)
         |                                                          ^
   net/ceph/crypto.c:99:19: error: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      99 |         memzero_explicit(*p, key->len);
         |                          ^~
   include/linux/string.h:356:43: note: passing argument to parameter 's' here
     356 | static inline void memzero_explicit(void *s, size_t count)
         |                                           ^
   9 errors generated.


vim +93 net/ceph/crypto.c

8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02   88  
19c7b44529ef1b net/ceph/crypto.c Abhinav Jain 2024-08-12   89  int ceph_crypto_key_decode(struct ceph_crypto_key *key, const void **p, const void *end)
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02   90  {
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02   91  	int ret;
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02   92  
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02  @93  	ceph_decode_need(p, end, 2*sizeof(u16) + sizeof(key->created), bad);
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02   94  	key->type = ceph_decode_16(p);
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02   95  	ceph_decode_copy(p, &key->created, sizeof(key->created));
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02   96  	key->len = ceph_decode_16(p);
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02   97  	ceph_decode_need(p, end, key->len, bad);
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02   98  	ret = set_secret(key, *p);
10f42b3e648377 net/ceph/crypto.c Ilya Dryomov 2020-12-22   99  	memzero_explicit(*p, key->len);
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02  100  	*p += key->len;
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02  101  	return ret;
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02  102  
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02  103  bad:
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02  104  	dout("failed to decode crypto key\n");
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02  105  	return -EINVAL;
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02  106  }
8b6e4f2d8b21c2 fs/ceph/crypto.c  Sage Weil    2010-02-02  107  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-08-12 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-11 20:55 [PATCH net v2] libceph: Make the arguments const as per the TODO Abhinav Jain
2024-08-12  7:09 ` kernel test robot
2024-08-12 15:26 ` kernel test robot [this message]
2024-08-12 15:46 ` Simon Horman

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=202408121938.QL7KtnzW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idryomov@gmail.com \
    --cc=jain.abhinav177@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=skhan@linuxfoundation.org \
    --cc=xiubli@redhat.com \
    /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 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.