[esmil:visionfive 60/64] drivers/soc/sifive/sifive_l2_cache.c:158:17: error: implicit declaration of function 'writeq'; did you mean 'writel'?
by kernel test robot
Hi Emil,
First bad commit (maybe != root cause):
tree: https://github.com/esmil/linux visionfive
head: a29d7d9e1f688baf4c70b3a1d2244193e3323e0d
commit: d9a4a3d985ace9a7d6edd6f60ed765443f0c8ae5 [60/64] RISC-V: Enable SIFIVE_L2_FLUSH for StarFive SoCs
config: riscv-randconfig-r031-20220213 (https://download.01.org/0day-ci/archive/20220214/202202141742.K9YE1JCn-lk...)
compiler: riscv32-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/esmil/linux/commit/d9a4a3d985ace9a7d6edd6f60ed765443f0...
git remote add esmil https://github.com/esmil/linux
git fetch --no-tags esmil visionfive
git checkout d9a4a3d985ace9a7d6edd6f60ed765443f0c8ae5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/soc/sifive/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/soc/sifive/sifive_l2_cache.c: In function 'sifive_l2_flush64_range':
>> drivers/soc/sifive/sifive_l2_cache.c:158:17: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
158 | writeq(line, l2_base + SIFIVE_L2_FLUSH64);
| ^~~~~~
| writel
cc1: some warnings being treated as errors
vim +158 drivers/soc/sifive/sifive_l2_cache.c
a967a289f16969 arch/riscv/mm/sifive_l2_cache.c Yash Shah 2019-05-06 126
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 127 #ifdef CONFIG_SIFIVE_L2_FLUSH
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 128 void sifive_l2_flush64_range(unsigned long start, unsigned long len)
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 129 {
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 130 unsigned long line;
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 131
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 132 if(!l2_base) {
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 133 pr_warn("L2CACHE: base addr invalid, skipping flush\n");
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 134 return;
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 135 }
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 136
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 137 /* TODO: if (len == 0), skipping flush or going on? */
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 138 if(!len) {
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 139 pr_debug("L2CACHE: flush64 range @ 0x%lx(len:0)\n", start);
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 140 return;
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 141 }
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 142
53c88578fe7510 drivers/soc/sifive/sifive_l2_cache.c Atish Patra 2021-06-12 143 len = len + (start % SIFIVE_L2_FLUSH64_LINE_LEN);
53c88578fe7510 drivers/soc/sifive/sifive_l2_cache.c Atish Patra 2021-06-12 144 start = ALIGN_DOWN(start, SIFIVE_L2_FLUSH64_LINE_LEN);
53c88578fe7510 drivers/soc/sifive/sifive_l2_cache.c Atish Patra 2021-06-12 145
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 146 /* make sure the address is in the range */
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 147 if(start < CONFIG_SIFIVE_L2_FLUSH_START ||
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 148 (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START +
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 149 CONFIG_SIFIVE_L2_FLUSH_SIZE)) {
402885eef783d5 drivers/soc/sifive/sifive_l2_cache.c Geert Uytterhoeven 2021-05-21 150 WARN(1, "L2CACHE: flush64 out of range: %lx(%lx), skip flush\n",
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 151 start, len);
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 152 return;
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 153 }
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 154
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 155 mb(); /* sync */
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 156 for (line = start; line < start + len;
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 157 line += SIFIVE_L2_FLUSH64_LINE_LEN) {
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 @158 writeq(line, l2_base + SIFIVE_L2_FLUSH64);
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 159 mb();
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 160 }
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 161 }
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 162 EXPORT_SYMBOL_GPL(sifive_l2_flush64_range);
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 163 #endif
9ca187fca0e9da drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 164
:::::: The code at line 158 was first introduced by commit
:::::: 9ca187fca0e9da3c005a260c74f75494eef2aa5f sifive/sifive_l2_cache: Add sifive_l2_flush64_range function
:::::: TO: Tom <support(a)vamrs.com>
:::::: CC: Emil Renner Berthing <kernel(a)esmil.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH V2] scsi: target: tcmu: Make cmd_ring_size changeable via configfs.
by kernel test robot
Hi Guixin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.17-rc4 next-20220211]
[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]
url: https://github.com/0day-ci/linux/commits/Guixin-Liu/scsi-target-tcmu-Make...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20220214/202202141721.OdtEVrDJ-lk...)
compiler: xtensa-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/0day-ci/linux/commit/c972a1533164208e331a5a4d34a7ed0bb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Guixin-Liu/scsi-target-tcmu-Make-cmd_ring_size-changeable-via-configfs/20220214-111810
git checkout c972a1533164208e331a5a4d34a7ed0bb44b17ba
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/target/target_core_user.c: In function 'tcmu_show_configfs_dev_params':
>> drivers/target/target_core_user.c:2627:49: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
2627 | bl += sprintf(b + bl, "CmdRingSizeMB: %lu\n",
| ~~^
| |
| long unsigned int
| %u
2628 | (udev->cmdr_size + CMDR_OFF) >> 20);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| u32 {aka unsigned int}
drivers/target/target_core_user.c: In function 'tcmu_cmd_ring_size_mb_show':
drivers/target/target_core_user.c:2743:45: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
2743 | return snprintf(page, PAGE_SIZE, "%lu\n",
| ~~^
| |
| long unsigned int
| %u
2744 | (udev->cmdr_size + CMDR_OFF) >> 20);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| u32 {aka unsigned int}
vim +2627 drivers/target/target_core_user.c
2616
2617 static ssize_t tcmu_show_configfs_dev_params(struct se_device *dev, char *b)
2618 {
2619 struct tcmu_dev *udev = TCMU_DEV(dev);
2620 ssize_t bl = 0;
2621
2622 bl = sprintf(b + bl, "Config: %s ",
2623 udev->dev_config[0] ? udev->dev_config : "NULL");
2624 bl += sprintf(b + bl, "Size: %llu ", udev->dev_size);
2625 bl += sprintf(b + bl, "MaxDataAreaMB: %u ", udev->data_area_mb);
2626 bl += sprintf(b + bl, "DataPagesPerBlk: %u", udev->data_pages_per_blk);
> 2627 bl += sprintf(b + bl, "CmdRingSizeMB: %lu\n",
2628 (udev->cmdr_size + CMDR_OFF) >> 20);
2629
2630 return bl;
2631 }
2632
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
gcc: error: unrecognized command-line option '-mno-space-regs'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 5f6e0fe01b6b33894cf6f61b359ab5a6d2b7674e parisc: Fix compile failure when building 64-bit kernel natively
date: 6 months ago
config: parisc64-randconfig-r035-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131837.mZeWy9J4-lk...)
compiler: hppa-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5f6e0fe01b6b33894cf6f61b359ab5a6d2b7674e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc64 prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
>> gcc: error: unrecognized command-line option '-mno-space-regs'
>> gcc: error: unrecognized command-line option '-mno-space-regs'
>> gcc: error: unrecognized command-line option '-mfast-indirect-calls'; did you mean '-mforce-indirect-call'?
>> gcc: error: unrecognized command-line option '-mfast-indirect-calls'; did you mean '-mforce-indirect-call'?
>> gcc: error: unrecognized command-line option '-mdisable-fpregs'
>> gcc: error: unrecognized command-line option '-mschedule=7200'
make[2]: *** [scripts/Makefile.build:117: scripts/mod/devicetable-offsets.s] Error 1
>> gcc: error: unrecognized command-line option '-mdisable-fpregs'
>> gcc: error: unrecognized command-line option '-mschedule=7200'
make[2]: *** [scripts/Makefile.build:271: scripts/mod/empty.o] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1216: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
include/linux/smp.h:34:33: error: requested alignment '20' is not a positive power of 2
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 5f6e0fe01b6b33894cf6f61b359ab5a6d2b7674e parisc: Fix compile failure when building 64-bit kernel natively
date: 6 months ago
config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131741.c6BPpfzd-lk...)
compiler: hppa64-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5f6e0fe01b6b33894cf6f61b359ab5a6d2b7674e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/parisc/include/asm/bitops.h:203,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/__fls.h: In function '__fls':
>> include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
18 | if (!(word & (~0ul << 32))) {
| ^~
include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
20 | word <<= 32;
| ^~~
include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
| ^~
include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
| ^~
include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
| ^~
include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
| ^~
include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
| ^~
In file included from arch/parisc/include/asm/bitops.h:203,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from arch/parisc/kernel/asm-offsets.c:18:
include/asm-generic/bitops/__fls.h: In function '__fls':
>> include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
18 | if (!(word & (~0ul << 32))) {
| ^~
include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
20 | word <<= 32;
| ^~~
include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
| ^~
include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
| ^~
include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
| ^~
include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
| ^~
include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
| ^~
In file included from arch/parisc/include/asm/processor.h:17,
from arch/parisc/include/asm/thread_info.h:8,
from include/linux/thread_info.h:60,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from arch/parisc/kernel/asm-offsets.c:18:
arch/parisc/include/asm/pdc.h: At top level:
>> arch/parisc/include/asm/pdc.h:75:24: warning: 'struct pdc_memory_table' declared inside parameter list will not be visible outside of this definition or declaration
75 | struct pdc_memory_table *tbl, unsigned long entries);
| ^~~~~~~~~~~~~~~~
>> arch/parisc/include/asm/pdc.h:74:30: warning: 'struct pdc_memory_table_raddr' declared inside parameter list will not be visible outside of this definition or declaration
74 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/compiler_types.h:65,
from <command-line>:
>> include/linux/smp.h:34:33: error: requested alignment '20' is not a positive power of 2
34 | __aligned(sizeof(struct __call_single_data));
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler_attributes.h:53:68: note: in definition of macro '__aligned'
53 | #define __aligned(x) __attribute__((__aligned__(x)))
| ^
In file included from include/linux/mm.h:33,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/parisc/kernel/asm-offsets.c:20:
include/linux/pgtable.h: In function 'pud_index':
>> include/linux/pgtable.h:77:25: warning: right shift count >= width of type [-Wshift-count-overflow]
77 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
| ^~
include/linux/pgtable.h: In function 'pgd_offset_pgd':
include/linux/pgtable.h:84:29: warning: right shift count >= width of type [-Wshift-count-overflow]
84 | #define pgd_index(a) (((a) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
| ^~
include/linux/pgtable.h:124:23: note: in expansion of macro 'pgd_index'
124 | return (pgd + pgd_index(address));
| ^~~~~~~~~
In file included from include/linux/stringhash.h:7,
from include/linux/dcache.h:15,
from include/linux/fs.h:8,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:728,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/parisc/kernel/asm-offsets.c:20:
include/linux/hash.h: In function 'hash32_ptr':
>> include/linux/hash.h:99:21: warning: right shift count >= width of type [-Wshift-count-overflow]
99 | val ^= (val >> 32);
| ^~
In file included from arch/parisc/kernel/asm-offsets.c:22:
arch/parisc/kernel/asm-offsets.c: In function 'main':
>> arch/parisc/kernel/asm-offsets.c:271:43: warning: right shift count >= width of type [-Wshift-count-overflow]
271 | DEFINE(ASM_PGD_ENTRY, PAGE_OFFSET >> PGDIR_SHIFT);
| ^~
include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
make[2]: *** [scripts/Makefile.build:117: arch/parisc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1217: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/20 +34 include/linux/smp.h
3d4422332711ef Jens Axboe 2008-06-26 28
545b8c8df41f9e Peter Zijlstra 2020-06-15 29 #define CSD_INIT(_func, _info) \
545b8c8df41f9e Peter Zijlstra 2020-06-15 30 (struct __call_single_data){ .func = (_func), .info = (_info), }
545b8c8df41f9e Peter Zijlstra 2020-06-15 31
966a967116e699 Ying Huang 2017-08-08 32 /* Use __aligned() to avoid to use 2 cache lines for 1 csd */
966a967116e699 Ying Huang 2017-08-08 33 typedef struct __call_single_data call_single_data_t
966a967116e699 Ying Huang 2017-08-08 @34 __aligned(sizeof(struct __call_single_data));
966a967116e699 Ying Huang 2017-08-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 966a967116e699762dbf4af7f9e0d1955c25aa37 smp: Avoid using two cache lines for struct call_single_data
:::::: TO: Ying Huang <ying.huang(a)intel.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH 2/2] Bluetooth: mediatek: fix the conflict between mtk and msft vendor event
by kernel test robot
Hi Sean,
Thanks for your patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20220211]
[cannot apply to v5.17-rc3]
[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]
url: https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/Bluetooth...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: riscv-randconfig-c006-20220205 (https://download.01.org/0day-ci/archive/20220213/202202130806.UHxKw5N3-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project dee058c670593b999fec19c458dbbd882ad9de56)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/33092fd43b74594bae07555a6fdf15133...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sean-wang-mediatek-com/Bluetooth-mt7921s-support-bluetooth-reset-mechanism/20220129-140313
git checkout 33092fd43b74594bae07555a6fdf15133cc8ec54
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <yujie.liu(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btusb.c:2273:3: warning: Value stored to 'hdr' is never read [clang-analyzer-deadcode.DeadStores]
hdr = (void *)skb->data;
^ ~~~~~~~~~~~~~~~~~
vim +/hdr +2273 drivers/bluetooth/btusb.c
5a87679ffd4436 mark-yw.chen 2021-09-01 2248
a1c49c434e1505 Sean Wang 2019-06-02 2249 static void btusb_mtk_wmt_recv(struct urb *urb)
a1c49c434e1505 Sean Wang 2019-06-02 2250 {
a1c49c434e1505 Sean Wang 2019-06-02 2251 struct hci_dev *hdev = urb->context;
a1c49c434e1505 Sean Wang 2019-06-02 2252 struct btusb_data *data = hci_get_drvdata(hdev);
a1c49c434e1505 Sean Wang 2019-06-02 @2253 struct hci_event_hdr *hdr;
a1c49c434e1505 Sean Wang 2019-06-02 2254 struct sk_buff *skb;
a1c49c434e1505 Sean Wang 2019-06-02 2255 int err;
a1c49c434e1505 Sean Wang 2019-06-02 2256
a1c49c434e1505 Sean Wang 2019-06-02 2257 if (urb->status == 0 && urb->actual_length > 0) {
a1c49c434e1505 Sean Wang 2019-06-02 2258 hdev->stat.byte_rx += urb->actual_length;
a1c49c434e1505 Sean Wang 2019-06-02 2259
a1c49c434e1505 Sean Wang 2019-06-02 2260 /* WMT event shouldn't be fragmented and the size should be
a1c49c434e1505 Sean Wang 2019-06-02 2261 * less than HCI_WMT_MAX_EVENT_SIZE.
a1c49c434e1505 Sean Wang 2019-06-02 2262 */
a1c49c434e1505 Sean Wang 2019-06-02 2263 skb = bt_skb_alloc(HCI_WMT_MAX_EVENT_SIZE, GFP_ATOMIC);
a1c49c434e1505 Sean Wang 2019-06-02 2264 if (!skb) {
a1c49c434e1505 Sean Wang 2019-06-02 2265 hdev->stat.err_rx++;
60c6a63a3d3080 Mark-YW.Chen 2021-10-14 2266 kfree(urb->setup_packet);
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2267 return;
a1c49c434e1505 Sean Wang 2019-06-02 2268 }
a1c49c434e1505 Sean Wang 2019-06-02 2269
a1c49c434e1505 Sean Wang 2019-06-02 2270 hci_skb_pkt_type(skb) = HCI_EVENT_PKT;
a1c49c434e1505 Sean Wang 2019-06-02 2271 skb_put_data(skb, urb->transfer_buffer, urb->actual_length);
a1c49c434e1505 Sean Wang 2019-06-02 2272
a1c49c434e1505 Sean Wang 2019-06-02 @2273 hdr = (void *)skb->data;
a1c49c434e1505 Sean Wang 2019-06-02 2274
a1c49c434e1505 Sean Wang 2019-06-02 2275 /* When someone waits for the WMT event, the skb is being cloned
a1c49c434e1505 Sean Wang 2019-06-02 2276 * and being processed the events from there then.
a1c49c434e1505 Sean Wang 2019-06-02 2277 */
a1c49c434e1505 Sean Wang 2019-06-02 2278 if (test_bit(BTUSB_TX_WAIT_VND_EVT, &data->flags)) {
22cc6b7a1dbb58 Johan Hovold 2019-11-28 2279 data->evt_skb = skb_clone(skb, GFP_ATOMIC);
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2280 if (!data->evt_skb) {
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2281 kfree_skb(skb);
60c6a63a3d3080 Mark-YW.Chen 2021-10-14 2282 kfree(urb->setup_packet);
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2283 return;
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2284 }
a1c49c434e1505 Sean Wang 2019-06-02 2285 }
a1c49c434e1505 Sean Wang 2019-06-02 2286
a1c49c434e1505 Sean Wang 2019-06-02 2287 err = hci_recv_frame(hdev, skb);
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2288 if (err < 0) {
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2289 kfree_skb(data->evt_skb);
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2290 data->evt_skb = NULL;
60c6a63a3d3080 Mark-YW.Chen 2021-10-14 2291 kfree(urb->setup_packet);
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2292 return;
de71a6cb4bf24d Jupeng Zhong 2021-02-02 2293 }
a1c49c434e1505 Sean Wang 2019-06-02 2294
a1c49c434e1505 Sean Wang 2019-06-02 2295 if (test_and_clear_bit(BTUSB_TX_WAIT_VND_EVT,
a1c49c434e1505 Sean Wang 2019-06-02 2296 &data->flags)) {
a1c49c434e1505 Sean Wang 2019-06-02 2297 /* Barrier to sync with other CPUs */
a1c49c434e1505 Sean Wang 2019-06-02 2298 smp_mb__after_atomic();
a1c49c434e1505 Sean Wang 2019-06-02 2299 wake_up_bit(&data->flags,
a1c49c434e1505 Sean Wang 2019-06-02 2300 BTUSB_TX_WAIT_VND_EVT);
a1c49c434e1505 Sean Wang 2019-06-02 2301 }
60c6a63a3d3080 Mark-YW.Chen 2021-10-14 2302 kfree(urb->setup_packet);
a1c49c434e1505 Sean Wang 2019-06-02 2303 return;
a1c49c434e1505 Sean Wang 2019-06-02 2304 } else if (urb->status == -ENOENT) {
a1c49c434e1505 Sean Wang 2019-06-02 2305 /* Avoid suspend failed when usb_kill_urb */
a1c49c434e1505 Sean Wang 2019-06-02 2306 return;
a1c49c434e1505 Sean Wang 2019-06-02 2307 }
a1c49c434e1505 Sean Wang 2019-06-02 2308
a1c49c434e1505 Sean Wang 2019-06-02 2309 usb_mark_last_busy(data->udev);
a1c49c434e1505 Sean Wang 2019-06-02 2310
a1c49c434e1505 Sean Wang 2019-06-02 2311 /* The URB complete handler is still called with urb->actual_length = 0
a1c49c434e1505 Sean Wang 2019-06-02 2312 * when the event is not available, so we should keep re-submitting
a1c49c434e1505 Sean Wang 2019-06-02 2313 * URB until WMT event returns, Also, It's necessary to wait some time
a1c49c434e1505 Sean Wang 2019-06-02 2314 * between the two consecutive control URBs to relax the target device
a1c49c434e1505 Sean Wang 2019-06-02 2315 * to generate the event. Otherwise, the WMT event cannot return from
a1c49c434e1505 Sean Wang 2019-06-02 2316 * the device successfully.
a1c49c434e1505 Sean Wang 2019-06-02 2317 */
48c13301e6baba Mark Chen 2021-02-02 2318 udelay(500);
a1c49c434e1505 Sean Wang 2019-06-02 2319
a1c49c434e1505 Sean Wang 2019-06-02 2320 usb_anchor_urb(urb, &data->ctrl_anchor);
a1c49c434e1505 Sean Wang 2019-06-02 2321 err = usb_submit_urb(urb, GFP_ATOMIC);
a1c49c434e1505 Sean Wang 2019-06-02 2322 if (err < 0) {
60c6a63a3d3080 Mark-YW.Chen 2021-10-14 2323 kfree(urb->setup_packet);
a1c49c434e1505 Sean Wang 2019-06-02 2324 /* -EPERM: urb is being killed;
a1c49c434e1505 Sean Wang 2019-06-02 2325 * -ENODEV: device got disconnected
a1c49c434e1505 Sean Wang 2019-06-02 2326 */
a1c49c434e1505 Sean Wang 2019-06-02 2327 if (err != -EPERM && err != -ENODEV)
a1c49c434e1505 Sean Wang 2019-06-02 2328 bt_dev_err(hdev, "urb %p failed to resubmit (%d)",
a1c49c434e1505 Sean Wang 2019-06-02 2329 urb, -err);
a1c49c434e1505 Sean Wang 2019-06-02 2330 usb_unanchor_urb(urb);
a1c49c434e1505 Sean Wang 2019-06-02 2331 }
a1c49c434e1505 Sean Wang 2019-06-02 2332 }
a1c49c434e1505 Sean Wang 2019-06-02 2333
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week