Re: [PATCH v2] tracing/cfi: Fix cmp_entries_* functions signature mismatch

From: kernel test robot
Date: Thu Oct 14 2021 - 06:45:33 EST


Hi Kalesh,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 348949d9a4440abdab3b1dc99a9bb660e8c7da7c]

url: https://github.com/0day-ci/linux/commits/Kalesh-Singh/tracing-cfi-Fix-cmp_entries_-functions-signature-mismatch/20211014-093824
base: 348949d9a4440abdab3b1dc99a9bb660e8c7da7c
config: x86_64-buildonly-randconfig-r002-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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/0day-ci/linux/commit/aca9efb61e0559ff7abff8c8bce5e1a65a73ccce
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kalesh-Singh/tracing-cfi-Fix-cmp_entries_-functions-signature-mismatch/20211014-093824
git checkout aca9efb61e0559ff7abff8c8bce5e1a65a73ccce
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64

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

All errors (new ones prefixed by >>):

>> kernel/trace/tracing_map.c:839:40: error: initializing 'const struct tracing_map_sort_entry **' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
const struct tracing_map_sort_entry **pa = A;
^ ~
kernel/trace/tracing_map.c:840:40: error: initializing 'const struct tracing_map_sort_entry **' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
const struct tracing_map_sort_entry **pb = B;
^ ~
kernel/trace/tracing_map.c:853:40: error: initializing 'const struct tracing_map_sort_entry **' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
const struct tracing_map_sort_entry **pa = A;
^ ~
kernel/trace/tracing_map.c:854:40: error: initializing 'const struct tracing_map_sort_entry **' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
const struct tracing_map_sort_entry **pb = B;
^ ~
kernel/trace/tracing_map.c:884:40: error: initializing 'const struct tracing_map_sort_entry **' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
const struct tracing_map_sort_entry **pa = A;
^ ~
kernel/trace/tracing_map.c:885:40: error: initializing 'const struct tracing_map_sort_entry **' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
const struct tracing_map_sort_entry **pb = B;
^ ~
6 errors generated.


vim +839 kernel/trace/tracing_map.c

836
837 static int cmp_entries_dup(const void *A, const void *B)
838 {
> 839 const struct tracing_map_sort_entry **pa = A;
840 const struct tracing_map_sort_entry **pb = B;
841 const struct tracing_map_sort_entry *a = *pa;
842 const struct tracing_map_sort_entry *b = *pb;
843 int ret = 0;
844
845 if (memcmp(a->key, b->key, a->elt->map->key_size))
846 ret = 1;
847
848 return ret;
849 }
850

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

Attachment: .config.gz
Description: application/gzip