[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202410051712.VDmFpiVZ-lkp@intel.com>
Date: Sat, 5 Oct 2024 18:00:51 +0800
From: kernel test robot <lkp@...el.com>
To: Xiaofeng Lian <1198715581lxf@...il.com>, stefani@...bold.net,
linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Xiaofeng Lian <1198715581lxf@...il.com>
Subject: Re: [PATCH v2] include/linux/kfifo.h: fix some IDEs Intelligence
errors and the previous patch was misnamed
Hi Xiaofeng,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.12-rc1 next-20241004]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Xiaofeng-Lian/include-linux-kfifo-h-fix-some-IDEs-Intelligence-errors-and-the-previous-patch-was-misnamed/20241003-012640
base: linus/master
patch link: https://lore.kernel.org/r/20241002172427.412715-1-1198715581lxf%40gmail.com
patch subject: [PATCH v2] include/linux/kfifo.h: fix some IDEs Intelligence errors and the previous patch was misnamed
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241005/202410051712.VDmFpiVZ-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241005/202410051712.VDmFpiVZ-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410051712.VDmFpiVZ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kvm/hyperv.c:984:3: error: member reference base type 'u64' (aka 'unsigned long long') is not a structure or union
984 | INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:151:46: note: expanded from macro 'INIT_KFIFO'
151 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:138:34: note: expanded from macro '__KFIFO_SIZE'
138 | DECLARE_KFIFO_PTR(__tmp_kfifo, get_kfifo_data_type(fifo));\
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:130:49: note: expanded from macro 'get_kfifo_data_type'
130 | #define get_kfifo_data_type(fifo) typeof(*(fifo)->type)
| ^ ~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/kfifo.h:84:28: note: expanded from macro 'STRUCT_KFIFO_PTR'
84 | struct __STRUCT_KFIFO_PTR(type, 0, type)
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
include/linux/kfifo.h:79:24: note: expanded from macro '__STRUCT_KFIFO_PTR'
79 | __STRUCT_KFIFO_COMMON(type, recsize, ptrtype); \
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:61:3: note: expanded from macro '__STRUCT_KFIFO_COMMON'
61 | datatype *type; \
| ^~~~~~~~
>> arch/x86/kvm/hyperv.c:984:3: error: member reference base type 'u64' (aka 'unsigned long long') is not a structure or union
984 | INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:151:46: note: expanded from macro 'INIT_KFIFO'
151 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:138:34: note: expanded from macro '__KFIFO_SIZE'
138 | DECLARE_KFIFO_PTR(__tmp_kfifo, get_kfifo_data_type(fifo));\
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:130:49: note: expanded from macro 'get_kfifo_data_type'
130 | #define get_kfifo_data_type(fifo) typeof(*(fifo)->type)
| ^ ~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/kfifo.h:84:28: note: expanded from macro 'STRUCT_KFIFO_PTR'
84 | struct __STRUCT_KFIFO_PTR(type, 0, type)
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
include/linux/kfifo.h:79:24: note: expanded from macro '__STRUCT_KFIFO_PTR'
79 | __STRUCT_KFIFO_COMMON(type, recsize, ptrtype); \
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:62:9: note: expanded from macro '__STRUCT_KFIFO_COMMON'
62 | const datatype *const_type; \
| ^~~~~~~~
>> arch/x86/kvm/hyperv.c:984:3: error: member reference base type 'u64' (aka 'unsigned long long') is not a structure or union
984 | INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:151:46: note: expanded from macro 'INIT_KFIFO'
151 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:138:34: note: expanded from macro '__KFIFO_SIZE'
138 | DECLARE_KFIFO_PTR(__tmp_kfifo, get_kfifo_data_type(fifo));\
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:130:49: note: expanded from macro 'get_kfifo_data_type'
130 | #define get_kfifo_data_type(fifo) typeof(*(fifo)->type)
| ^ ~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/kfifo.h:84:37: note: expanded from macro 'STRUCT_KFIFO_PTR'
84 | struct __STRUCT_KFIFO_PTR(type, 0, type)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/kfifo.h:79:39: note: expanded from macro '__STRUCT_KFIFO_PTR'
79 | __STRUCT_KFIFO_COMMON(type, recsize, ptrtype); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
include/linux/kfifo.h:64:3: note: expanded from macro '__STRUCT_KFIFO_COMMON'
64 | ptrtype *ptr; \
| ^~~~~~~
>> arch/x86/kvm/hyperv.c:984:3: error: member reference base type 'u64' (aka 'unsigned long long') is not a structure or union
984 | INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:151:46: note: expanded from macro 'INIT_KFIFO'
151 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:138:34: note: expanded from macro '__KFIFO_SIZE'
138 | DECLARE_KFIFO_PTR(__tmp_kfifo, get_kfifo_data_type(fifo));\
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:130:49: note: expanded from macro 'get_kfifo_data_type'
130 | #define get_kfifo_data_type(fifo) typeof(*(fifo)->type)
| ^ ~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/kfifo.h:84:37: note: expanded from macro 'STRUCT_KFIFO_PTR'
84 | struct __STRUCT_KFIFO_PTR(type, 0, type)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/kfifo.h:79:39: note: expanded from macro '__STRUCT_KFIFO_PTR'
79 | __STRUCT_KFIFO_COMMON(type, recsize, ptrtype); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
include/linux/kfifo.h:65:3: note: expanded from macro '__STRUCT_KFIFO_COMMON'
65 | ptrtype const *ptr_const; \
| ^~~~~~~
>> arch/x86/kvm/hyperv.c:984:3: error: member reference base type 'u64' (aka 'unsigned long long') is not a structure or union
984 | INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:151:46: note: expanded from macro 'INIT_KFIFO'
151 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:138:34: note: expanded from macro '__KFIFO_SIZE'
138 | DECLARE_KFIFO_PTR(__tmp_kfifo, get_kfifo_data_type(fifo));\
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:130:49: note: expanded from macro 'get_kfifo_data_type'
130 | #define get_kfifo_data_type(fifo) typeof(*(fifo)->type)
| ^ ~~~~
include/linux/kfifo.h:116:56: note: expanded from macro 'DECLARE_KFIFO_PTR'
116 | #define DECLARE_KFIFO_PTR(fifo, type) STRUCT_KFIFO_PTR(type) fifo
| ~~~~~~~~~~~~~~~~~^~~~~
include/linux/kfifo.h:84:28: note: expanded from macro 'STRUCT_KFIFO_PTR'
84 | struct __STRUCT_KFIFO_PTR(type, 0, type)
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
include/linux/kfifo.h:80:2: note: expanded from macro '__STRUCT_KFIFO_PTR'
80 | type buf[0]; \
| ^~~~
>> arch/x86/kvm/hyperv.c:984:3: error: member reference base type 'u64' (aka 'unsigned long long') is not a structure or union
984 | INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:151:46: note: expanded from macro 'INIT_KFIFO'
151 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:139:52: note: expanded from macro '__KFIFO_SIZE'
139 | (sizeof(*(fifo)) - sizeof(__tmp_kfifo)) / sizeof(get_kfifo_data_type(fifo));\
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:130:49: note: expanded from macro 'get_kfifo_data_type'
130 | #define get_kfifo_data_type(fifo) typeof(*(fifo)->type)
| ~~~~~~^ ~~~~
>> arch/x86/kvm/hyperv.c:984:3: error: invalid operands to binary expression ('void' and 'int')
984 | INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:151:71: note: expanded from macro 'INIT_KFIFO'
151 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
| ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
7 errors generated.
vim +984 arch/x86/kvm/hyperv.c
1f4b34f825e8ce Andrey Smetanin 2015-11-30 959
3be29eb7b5251a Sean Christopherson 2022-08-30 960 int kvm_hv_vcpu_init(struct kvm_vcpu *vcpu)
5c919412fe61c3 Andrey Smetanin 2015-11-10 961 {
1cac8d9f6bd25d Sean Christopherson 2022-08-30 962 struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu);
1f4b34f825e8ce Andrey Smetanin 2015-11-30 963 int i;
1f4b34f825e8ce Andrey Smetanin 2015-11-30 964
1cac8d9f6bd25d Sean Christopherson 2022-08-30 965 if (hv_vcpu)
1cac8d9f6bd25d Sean Christopherson 2022-08-30 966 return 0;
1cac8d9f6bd25d Sean Christopherson 2022-08-30 967
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 968 hv_vcpu = kzalloc(sizeof(struct kvm_vcpu_hv), GFP_KERNEL_ACCOUNT);
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 969 if (!hv_vcpu)
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 970 return -ENOMEM;
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 971
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 972 vcpu->arch.hyperv = hv_vcpu;
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 973 hv_vcpu->vcpu = vcpu;
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 974
1f4b34f825e8ce Andrey Smetanin 2015-11-30 975 synic_init(&hv_vcpu->synic);
1f4b34f825e8ce Andrey Smetanin 2015-11-30 976
1f4b34f825e8ce Andrey Smetanin 2015-11-30 977 bitmap_zero(hv_vcpu->stimer_pending_bitmap, HV_SYNIC_STIMER_COUNT);
1f4b34f825e8ce Andrey Smetanin 2015-11-30 978 for (i = 0; i < ARRAY_SIZE(hv_vcpu->stimer); i++)
1f4b34f825e8ce Andrey Smetanin 2015-11-30 979 stimer_init(&hv_vcpu->stimer[i], i);
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 980
4eeef2424153e7 Sean Christopherson 2021-09-10 981 hv_vcpu->vp_index = vcpu->vcpu_idx;
fc08b628d7c96d Vitaly Kuznetsov 2021-01-26 982
53ca765a041d5a Vitaly Kuznetsov 2022-11-01 983 for (i = 0; i < HV_NR_TLB_FLUSH_FIFOS; i++) {
53ca765a041d5a Vitaly Kuznetsov 2022-11-01 @984 INIT_KFIFO(hv_vcpu->tlb_flush_fifo[i].entries);
53ca765a041d5a Vitaly Kuznetsov 2022-11-01 985 spin_lock_init(&hv_vcpu->tlb_flush_fifo[i].write_lock);
53ca765a041d5a Vitaly Kuznetsov 2022-11-01 986 }
0823570f01989d Vitaly Kuznetsov 2022-11-01 987
4592b7eaa87d35 Vitaly Kuznetsov 2021-01-26 988 return 0;
5c919412fe61c3 Andrey Smetanin 2015-11-10 989 }
5c919412fe61c3 Andrey Smetanin 2015-11-10 990
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists