[android-common:android12-5.4 5/9] drivers/dma-buf/heaps/deferred-free-helper.c:23:19: sparse: sparse: symbol 'freelist_waitqueue' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: e3919bfeb0066ab9b5f9765e5610b95672990e64 [5/9] ANDROID: dma-buf: system_heap: Add deferred freeing to the system heap
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout e3919bfeb0066ab9b5f9765e5610b95672990e64
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma-buf/heaps/ tools/virtio/vhost_test/vhost_test.ko
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/heaps/deferred-free-helper.c:23:19: sparse: sparse: symbol 'freelist_waitqueue' was not declared. Should it be static?
>> drivers/dma-buf/heaps/deferred-free-helper.c:24:20: sparse: sparse: symbol 'freelist_task' was not declared. Should it be static?
vim +/freelist_waitqueue +23 drivers/dma-buf/heaps/deferred-free-helper.c
bd1639945c3029 John Stultz 2020-12-09 20
bd1639945c3029 John Stultz 2020-12-09 21 static LIST_HEAD(free_list);
bd1639945c3029 John Stultz 2020-12-09 22 static size_t list_nr_pages;
bd1639945c3029 John Stultz 2020-12-09 @23 wait_queue_head_t freelist_waitqueue;
bd1639945c3029 John Stultz 2020-12-09 @24 struct task_struct *freelist_task;
bd1639945c3029 John Stultz 2020-12-09 25 static DEFINE_SPINLOCK(free_list_lock);
bd1639945c3029 John Stultz 2020-12-09 26
:::::: The code at line 23 was first introduced by commit
:::::: bd1639945c30298e4bea2b611d6b0cd08d3cdd98 ANDROID: dma-buf: heaps: Add deferred-free-helper library code
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
drivers/remoteproc/ti_k3_r5_remoteproc.c:377:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d0ee23f9d78be5531c4b055ea424ed0b489dfe9b
commit: 34f2653686fecc9bd5a4ee16724768c72953fb57 remoteproc: k3-r5: Initialize TCM memories for ECC
date: 11 months ago
config: arm64-randconfig-s031-20210914 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# 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 34f2653686fecc9bd5a4ee16724768c72953fb57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/remoteproc/ti_k3_r5_remoteproc.c:377:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *cpu_addr @@
drivers/remoteproc/ti_k3_r5_remoteproc.c:377:28: sparse: expected void *
drivers/remoteproc/ti_k3_r5_remoteproc.c:377:28: sparse: got void [noderef] __iomem *cpu_addr
drivers/remoteproc/ti_k3_r5_remoteproc.c:380:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *cpu_addr @@
drivers/remoteproc/ti_k3_r5_remoteproc.c:380:28: sparse: expected void *
drivers/remoteproc/ti_k3_r5_remoteproc.c:380:28: sparse: got void [noderef] __iomem *cpu_addr
vim +377 drivers/remoteproc/ti_k3_r5_remoteproc.c
346
347 /*
348 * The R5F cores have controls for both a reset and a halt/run. The code
349 * execution from DDR requires the initial boot-strapping code to be run
350 * from the internal TCMs. This function is used to release the resets on
351 * applicable cores to allow loading into the TCMs. The .prepare() ops is
352 * invoked by remoteproc core before any firmware loading, and is followed
353 * by the .start() ops after loading to actually let the R5 cores run.
354 */
355 static int k3_r5_rproc_prepare(struct rproc *rproc)
356 {
357 struct k3_r5_rproc *kproc = rproc->priv;
358 struct k3_r5_cluster *cluster = kproc->cluster;
359 struct k3_r5_core *core = kproc->core;
360 struct device *dev = kproc->dev;
361 int ret;
362
363 ret = (cluster->mode == CLUSTER_MODE_LOCKSTEP) ?
364 k3_r5_lockstep_release(cluster) : k3_r5_split_release(core);
365 if (ret) {
366 dev_err(dev, "unable to enable cores for TCM loading, ret = %d\n",
367 ret);
368 return ret;
369 }
370
371 /*
372 * Zero out both TCMs unconditionally (access from v8 Arm core is not
373 * affected by ATCM & BTCM enable configuration values) so that ECC
374 * can be effective on all TCM addresses.
375 */
376 dev_dbg(dev, "zeroing out ATCM memory\n");
> 377 memset(core->mem[0].cpu_addr, 0x00, core->mem[0].size);
378
379 dev_dbg(dev, "zeroing out BTCM memory\n");
380 memset(core->mem[1].cpu_addr, 0x00, core->mem[1].size);
381
382 return 0;
383 }
384
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH 2/2] clk: qcom: Add Global Clock Controller driver for QCM2290
by kernel test robot
Hi Shawn,
I love your patch! Perhaps something to improve:
[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next v5.15-rc1 next-20210914]
[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/Shawn-Guo/Add-QCM2290-Global-Clo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: arm64-buildonly-randconfig-r004-20210914 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/b510487ae2d062b96312e0947f3ed37b5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Shawn-Guo/Add-QCM2290-Global-Clock-Controller-driver/20210914-112253
git checkout b510487ae2d062b96312e0947f3ed37b5faa79fc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/clk/qcom/gcc-qcm2290.c:623:32: warning: unused variable 'gcc_parent_map_11' [-Wunused-const-variable]
static const struct parent_map gcc_parent_map_11[] = {
^
>> drivers/clk/qcom/gcc-qcm2290.c:633:37: warning: unused variable 'gcc_parents_11' [-Wunused-const-variable]
static const struct clk_parent_data gcc_parents_11[] = {
^
>> drivers/clk/qcom/gcc-qcm2290.c:683:32: warning: unused variable 'gcc_parent_map_15' [-Wunused-const-variable]
static const struct parent_map gcc_parent_map_15[] = {
^
>> drivers/clk/qcom/gcc-qcm2290.c:688:37: warning: unused variable 'gcc_parents_15' [-Wunused-const-variable]
static const struct clk_parent_data gcc_parents_15[] = {
^
>> drivers/clk/qcom/gcc-qcm2290.c:693:32: warning: unused variable 'gcc_parent_map_16' [-Wunused-const-variable]
static const struct parent_map gcc_parent_map_16[] = {
^
>> drivers/clk/qcom/gcc-qcm2290.c:699:37: warning: unused variable 'gcc_parents_16' [-Wunused-const-variable]
static const struct clk_parent_data gcc_parents_16[] = {
^
6 warnings generated.
vim +/gcc_parent_map_11 +623 drivers/clk/qcom/gcc-qcm2290.c
622
> 623 static const struct parent_map gcc_parent_map_11[] = {
624 { P_BI_TCXO, 0 },
625 { P_GPLL0_OUT_EARLY, 1 },
626 { P_GPLL0_OUT_AUX2, 2 },
627 { P_GPLL5_OUT_MAIN, 3 },
628 { P_GPLL6_OUT_MAIN, 4 },
629 { P_GPLL6_OUT_EARLY, 5 },
630 { P_GPLL3_OUT_EARLY, 6 },
631 };
632
> 633 static const struct clk_parent_data gcc_parents_11[] = {
634 { .fw_name = "bi_tcxo" },
635 { .hw = &gpll0.clkr.hw },
636 { .hw = &gpll0_out_aux2.clkr.hw },
637 { .hw = &gpll5.clkr.hw },
638 { .hw = &gpll6_out_main.clkr.hw },
639 { .hw = &gpll6.clkr.hw },
640 { .hw = &gpll3.clkr.hw },
641 };
642
643 static const struct parent_map gcc_parent_map_12[] = {
644 { P_BI_TCXO, 0 },
645 { P_GPLL0_OUT_EARLY, 1 },
646 { P_GPLL0_OUT_AUX2, 2 },
647 { P_GPLL7_OUT_MAIN, 3 },
648 { P_GPLL4_OUT_MAIN, 5 },
649 };
650
651 static const struct clk_parent_data gcc_parents_12[] = {
652 { .fw_name = "bi_tcxo" },
653 { .hw = &gpll0.clkr.hw },
654 { .hw = &gpll0_out_aux2.clkr.hw },
655 { .hw = &gpll7.clkr.hw },
656 { .hw = &gpll4.clkr.hw },
657 };
658
659 static const struct parent_map gcc_parent_map_13[] = {
660 { P_BI_TCXO, 0 },
661 { P_SLEEP_CLK, 5 },
662 };
663
664 static const struct clk_parent_data gcc_parents_13[] = {
665 { .fw_name = "bi_tcxo" },
666 { .fw_name = "sleep_clk" },
667 };
668
669 static const struct parent_map gcc_parent_map_14[] = {
670 { P_BI_TCXO, 0 },
671 { P_GPLL11_OUT_MAIN, 1 },
672 { P_GPLL11_OUT_AUX, 2 },
673 { P_GPLL11_OUT_AUX2, 3 },
674 };
675
676 static const struct clk_parent_data gcc_parents_14[] = {
677 { .fw_name = "bi_tcxo" },
678 { .hw = &gpll11.clkr.hw },
679 { .hw = &gpll11.clkr.hw },
680 { .hw = &gpll11.clkr.hw },
681 };
682
> 683 static const struct parent_map gcc_parent_map_15[] = {
684 { P_BI_TCXO, 0 },
685 { P_GPLL0_OUT_EARLY, 1 },
686 };
687
> 688 static const struct clk_parent_data gcc_parents_15[] = {
689 { .fw_name = "bi_tcxo" },
690 { .hw = &gpll0.clkr.hw },
691 };
692
> 693 static const struct parent_map gcc_parent_map_16[] = {
694 { P_BI_TCXO, 0 },
695 { P_GPLL0_OUT_EARLY, 1 },
696 { P_GPLL6_OUT_MAIN, 4 },
697 };
698
> 699 static const struct clk_parent_data gcc_parents_16[] = {
700 { .fw_name = "bi_tcxo" },
701 { .hw = &gpll0.clkr.hw },
702 { .hw = &gpll6_out_main.clkr.hw },
703 };
704
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
arch/mips/mm/tlbex.c:2599 check_pabits() warn: always true condition '(fillbits >= ((__builtin_constant_p(0)) ?(((0) < 2) ?0:63 - __builtin_clzll(0)):((4 <= 4)) ?__ilog2_u32(0):__ilog2_u64(0))) => (0-u32max >= 0)'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d0ee23f9d78be5531c4b055ea424ed0b489dfe9b
commit: 2f78788b55baa3410b1ec91a576286abe1ad4d6a ilog2: improve ilog2 for constant arguments
date: 9 months ago
config: mips-randconfig-m031-20210914 (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
arch/mips/mm/tlbex.c:2599 check_pabits() warn: always true condition '(fillbits >= ((__builtin_constant_p(0)) ?(((0) < 2) ?0:63 - __builtin_clzll(0)):((4 <= 4)) ?__ilog2_u32(0):__ilog2_u64(0))) => (0-u32max >= 0)'
Old smatch warnings:
arch/mips/mm/tlbex.c:1741 iPTE_SW() warn: inconsistent indenting
vim +2599 arch/mips/mm/tlbex.c
c5b367835cfc7a Steven J. Hill 2015-02-26 2569
00bf1c691d082c Paul Burton 2015-09-22 2570 static void check_pabits(void)
00bf1c691d082c Paul Burton 2015-09-22 2571 {
00bf1c691d082c Paul Burton 2015-09-22 2572 unsigned long entry;
00bf1c691d082c Paul Burton 2015-09-22 2573 unsigned pabits, fillbits;
00bf1c691d082c Paul Burton 2015-09-22 2574
00bf1c691d082c Paul Burton 2015-09-22 2575 if (!cpu_has_rixi || !_PAGE_NO_EXEC) {
00bf1c691d082c Paul Burton 2015-09-22 2576 /*
00bf1c691d082c Paul Burton 2015-09-22 2577 * We'll only be making use of the fact that we can rotate bits
00bf1c691d082c Paul Burton 2015-09-22 2578 * into the fill if the CPU supports RIXI, so don't bother
00bf1c691d082c Paul Burton 2015-09-22 2579 * probing this for CPUs which don't.
00bf1c691d082c Paul Burton 2015-09-22 2580 */
00bf1c691d082c Paul Burton 2015-09-22 2581 return;
00bf1c691d082c Paul Burton 2015-09-22 2582 }
00bf1c691d082c Paul Burton 2015-09-22 2583
00bf1c691d082c Paul Burton 2015-09-22 2584 write_c0_entrylo0(~0ul);
00bf1c691d082c Paul Burton 2015-09-22 2585 back_to_back_c0_hazard();
00bf1c691d082c Paul Burton 2015-09-22 2586 entry = read_c0_entrylo0();
00bf1c691d082c Paul Burton 2015-09-22 2587
00bf1c691d082c Paul Burton 2015-09-22 2588 /* clear all non-PFN bits */
00bf1c691d082c Paul Burton 2015-09-22 2589 entry &= ~((1 << MIPS_ENTRYLO_PFN_SHIFT) - 1);
00bf1c691d082c Paul Burton 2015-09-22 2590 entry &= ~(MIPS_ENTRYLO_RI | MIPS_ENTRYLO_XI);
00bf1c691d082c Paul Burton 2015-09-22 2591
00bf1c691d082c Paul Burton 2015-09-22 2592 /* find a lower bound on PABITS, and upper bound on fill bits */
00bf1c691d082c Paul Burton 2015-09-22 2593 pabits = fls_long(entry) + 6;
00bf1c691d082c Paul Burton 2015-09-22 2594 fillbits = max_t(int, (int)BITS_PER_LONG - pabits, 0);
00bf1c691d082c Paul Burton 2015-09-22 2595
00bf1c691d082c Paul Burton 2015-09-22 2596 /* minus the RI & XI bits */
00bf1c691d082c Paul Burton 2015-09-22 2597 fillbits -= min_t(unsigned, fillbits, 2);
00bf1c691d082c Paul Burton 2015-09-22 2598
00bf1c691d082c Paul Burton 2015-09-22 @2599 if (fillbits >= ilog2(_PAGE_NO_EXEC))
00bf1c691d082c Paul Burton 2015-09-22 2600 fill_includes_sw_bits = true;
00bf1c691d082c Paul Burton 2015-09-22 2601
00bf1c691d082c Paul Burton 2015-09-22 2602 pr_debug("Entry* registers contain %u fill bits\n", fillbits);
00bf1c691d082c Paul Burton 2015-09-22 2603 }
00bf1c691d082c Paul Burton 2015-09-22 2604
:::::: The code at line 2599 was first introduced by commit
:::::: 00bf1c691d082c1945fdba032c03a9a82e9e7e61 MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields
:::::: TO: Paul Burton <paul.burton(a)imgtec.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH 2/2] clk: qcom: Add Global Clock Controller driver for QCM2290
by kernel test robot
Hi Shawn,
I love your patch! Yet something to improve:
[auto build test ERROR on clk/clk-next]
[also build test ERROR on robh/for-next v5.15-rc1 next-20210914]
[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/Shawn-Guo/Add-QCM2290-Global-Clo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/b510487ae2d062b96312e0947f3ed37b5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Shawn-Guo/Add-QCM2290-Global-Clock-Controller-driver/20210914-112253
git checkout b510487ae2d062b96312e0947f3ed37b5faa79fc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
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/clk/qcom/gcc-qcm2290.c:699:37: error: 'gcc_parents_16' defined but not used [-Werror=unused-const-variable=]
699 | static const struct clk_parent_data gcc_parents_16[] = {
| ^~~~~~~~~~~~~~
>> drivers/clk/qcom/gcc-qcm2290.c:693:32: error: 'gcc_parent_map_16' defined but not used [-Werror=unused-const-variable=]
693 | static const struct parent_map gcc_parent_map_16[] = {
| ^~~~~~~~~~~~~~~~~
>> drivers/clk/qcom/gcc-qcm2290.c:688:37: error: 'gcc_parents_15' defined but not used [-Werror=unused-const-variable=]
688 | static const struct clk_parent_data gcc_parents_15[] = {
| ^~~~~~~~~~~~~~
>> drivers/clk/qcom/gcc-qcm2290.c:683:32: error: 'gcc_parent_map_15' defined but not used [-Werror=unused-const-variable=]
683 | static const struct parent_map gcc_parent_map_15[] = {
| ^~~~~~~~~~~~~~~~~
>> drivers/clk/qcom/gcc-qcm2290.c:633:37: error: 'gcc_parents_11' defined but not used [-Werror=unused-const-variable=]
633 | static const struct clk_parent_data gcc_parents_11[] = {
| ^~~~~~~~~~~~~~
>> drivers/clk/qcom/gcc-qcm2290.c:623:32: error: 'gcc_parent_map_11' defined but not used [-Werror=unused-const-variable=]
623 | static const struct parent_map gcc_parent_map_11[] = {
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/gcc_parents_16 +699 drivers/clk/qcom/gcc-qcm2290.c
622
> 623 static const struct parent_map gcc_parent_map_11[] = {
624 { P_BI_TCXO, 0 },
625 { P_GPLL0_OUT_EARLY, 1 },
626 { P_GPLL0_OUT_AUX2, 2 },
627 { P_GPLL5_OUT_MAIN, 3 },
628 { P_GPLL6_OUT_MAIN, 4 },
629 { P_GPLL6_OUT_EARLY, 5 },
630 { P_GPLL3_OUT_EARLY, 6 },
631 };
632
> 633 static const struct clk_parent_data gcc_parents_11[] = {
634 { .fw_name = "bi_tcxo" },
635 { .hw = &gpll0.clkr.hw },
636 { .hw = &gpll0_out_aux2.clkr.hw },
637 { .hw = &gpll5.clkr.hw },
638 { .hw = &gpll6_out_main.clkr.hw },
639 { .hw = &gpll6.clkr.hw },
640 { .hw = &gpll3.clkr.hw },
641 };
642
643 static const struct parent_map gcc_parent_map_12[] = {
644 { P_BI_TCXO, 0 },
645 { P_GPLL0_OUT_EARLY, 1 },
646 { P_GPLL0_OUT_AUX2, 2 },
647 { P_GPLL7_OUT_MAIN, 3 },
648 { P_GPLL4_OUT_MAIN, 5 },
649 };
650
651 static const struct clk_parent_data gcc_parents_12[] = {
652 { .fw_name = "bi_tcxo" },
653 { .hw = &gpll0.clkr.hw },
654 { .hw = &gpll0_out_aux2.clkr.hw },
655 { .hw = &gpll7.clkr.hw },
656 { .hw = &gpll4.clkr.hw },
657 };
658
659 static const struct parent_map gcc_parent_map_13[] = {
660 { P_BI_TCXO, 0 },
661 { P_SLEEP_CLK, 5 },
662 };
663
664 static const struct clk_parent_data gcc_parents_13[] = {
665 { .fw_name = "bi_tcxo" },
666 { .fw_name = "sleep_clk" },
667 };
668
669 static const struct parent_map gcc_parent_map_14[] = {
670 { P_BI_TCXO, 0 },
671 { P_GPLL11_OUT_MAIN, 1 },
672 { P_GPLL11_OUT_AUX, 2 },
673 { P_GPLL11_OUT_AUX2, 3 },
674 };
675
676 static const struct clk_parent_data gcc_parents_14[] = {
677 { .fw_name = "bi_tcxo" },
678 { .hw = &gpll11.clkr.hw },
679 { .hw = &gpll11.clkr.hw },
680 { .hw = &gpll11.clkr.hw },
681 };
682
> 683 static const struct parent_map gcc_parent_map_15[] = {
684 { P_BI_TCXO, 0 },
685 { P_GPLL0_OUT_EARLY, 1 },
686 };
687
> 688 static const struct clk_parent_data gcc_parents_15[] = {
689 { .fw_name = "bi_tcxo" },
690 { .hw = &gpll0.clkr.hw },
691 };
692
> 693 static const struct parent_map gcc_parent_map_16[] = {
694 { P_BI_TCXO, 0 },
695 { P_GPLL0_OUT_EARLY, 1 },
696 { P_GPLL6_OUT_MAIN, 4 },
697 };
698
> 699 static const struct clk_parent_data gcc_parents_16[] = {
700 { .fw_name = "bi_tcxo" },
701 { .hw = &gpll0.clkr.hw },
702 { .hw = &gpll6_out_main.clkr.hw },
703 };
704
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[zen-kernel-zen-kernel:5.14/prjc 199/209] kernel/sched/alt_core.c:5387: warning: expecting prototype for sys_sched_getscheduler(). Prototype was for sys_sched_getparam() instead
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.14/prjc
head: d549588e3d79002f0c4b567b49644318af78a3db
commit: 8e79ff69bdee272975f92e45e8b4ecf0690b636e [199/209] sched/alt: [Sync] 2f064a59a11f sched: Change task_struct::state
config: nds32-defconfig (attached as .config)
compiler: nds32le-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/zen-kernel/zen-kernel/commit/8e79ff69bdee272975f92e45e...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.14/prjc
git checkout 8e79ff69bdee272975f92e45e8b4ecf0690b636e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash kernel/sched/
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 >>):
kernel/sched/alt_core.c:114: warning: cannot understand function prototype: 'int sched_yield_type __read_mostly = 1; '
kernel/sched/alt_core.c:3001: warning: Function parameter or member 'prev' not described in 'prepare_task_switch'
kernel/sched/alt_core.c:3034: warning: Excess function parameter 'rq' description in 'finish_task_switch'
kernel/sched/alt_core.c:5319: warning: Function parameter or member 'flags' not described in 'sys_sched_setattr'
>> kernel/sched/alt_core.c:5387: warning: expecting prototype for sys_sched_getscheduler(). Prototype was for sys_sched_getparam() instead
vim +5387 kernel/sched/alt_core.c
f746b5817d3274 Alfred Chen 2019-08-19 5377
f746b5817d3274 Alfred Chen 2019-08-19 5378 /**
f746b5817d3274 Alfred Chen 2019-08-19 5379 * sys_sched_getscheduler - get the RT priority of a thread
f746b5817d3274 Alfred Chen 2019-08-19 5380 * @pid: the pid in question.
f746b5817d3274 Alfred Chen 2019-08-19 5381 * @param: structure containing the RT priority.
f746b5817d3274 Alfred Chen 2019-08-19 5382 *
f746b5817d3274 Alfred Chen 2019-08-19 5383 * Return: On success, 0 and the RT priority is in @param. Otherwise, an error
f746b5817d3274 Alfred Chen 2019-08-19 5384 * code.
f746b5817d3274 Alfred Chen 2019-08-19 5385 */
f746b5817d3274 Alfred Chen 2019-08-19 5386 SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
f746b5817d3274 Alfred Chen 2019-08-19 @5387 {
f746b5817d3274 Alfred Chen 2019-08-19 5388 struct sched_param lp = { .sched_priority = 0 };
f746b5817d3274 Alfred Chen 2019-08-19 5389 struct task_struct *p;
f746b5817d3274 Alfred Chen 2019-08-19 5390 int retval = -EINVAL;
f746b5817d3274 Alfred Chen 2019-08-19 5391
f746b5817d3274 Alfred Chen 2019-08-19 5392 if (!param || pid < 0)
f746b5817d3274 Alfred Chen 2019-08-19 5393 goto out_nounlock;
f746b5817d3274 Alfred Chen 2019-08-19 5394
f746b5817d3274 Alfred Chen 2019-08-19 5395 rcu_read_lock();
f746b5817d3274 Alfred Chen 2019-08-19 5396 p = find_process_by_pid(pid);
f746b5817d3274 Alfred Chen 2019-08-19 5397 retval = -ESRCH;
f746b5817d3274 Alfred Chen 2019-08-19 5398 if (!p)
f746b5817d3274 Alfred Chen 2019-08-19 5399 goto out_unlock;
f746b5817d3274 Alfred Chen 2019-08-19 5400
f746b5817d3274 Alfred Chen 2019-08-19 5401 retval = security_task_getscheduler(p);
f746b5817d3274 Alfred Chen 2019-08-19 5402 if (retval)
f746b5817d3274 Alfred Chen 2019-08-19 5403 goto out_unlock;
f746b5817d3274 Alfred Chen 2019-08-19 5404
f746b5817d3274 Alfred Chen 2019-08-19 5405 if (task_has_rt_policy(p))
f746b5817d3274 Alfred Chen 2019-08-19 5406 lp.sched_priority = p->rt_priority;
f746b5817d3274 Alfred Chen 2019-08-19 5407 rcu_read_unlock();
f746b5817d3274 Alfred Chen 2019-08-19 5408
f746b5817d3274 Alfred Chen 2019-08-19 5409 /*
f746b5817d3274 Alfred Chen 2019-08-19 5410 * This one might sleep, we cannot do it with a spinlock held ...
f746b5817d3274 Alfred Chen 2019-08-19 5411 */
f746b5817d3274 Alfred Chen 2019-08-19 5412 retval = copy_to_user(param, &lp, sizeof(*param)) ? -EFAULT : 0;
f746b5817d3274 Alfred Chen 2019-08-19 5413
f746b5817d3274 Alfred Chen 2019-08-19 5414 out_nounlock:
f746b5817d3274 Alfred Chen 2019-08-19 5415 return retval;
f746b5817d3274 Alfred Chen 2019-08-19 5416
f746b5817d3274 Alfred Chen 2019-08-19 5417 out_unlock:
f746b5817d3274 Alfred Chen 2019-08-19 5418 rcu_read_unlock();
f746b5817d3274 Alfred Chen 2019-08-19 5419 return retval;
f746b5817d3274 Alfred Chen 2019-08-19 5420 }
f746b5817d3274 Alfred Chen 2019-08-19 5421
:::::: The code at line 5387 was first introduced by commit
:::::: f746b5817d3274fa4f458f87f6b452e7304b1d64 Project C v5.7.5-r2
:::::: TO: Alfred Chen <cchalpha(a)gmail.com>
:::::: CC: Alfred Chen <cchalpha(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[zen-kernel-zen-kernel:5.14/prjc 82/209] kernel/sched/alt_core.c:5925:45: warning: passing argument 2 of 'cpumask_copy' makes pointer from integer without a cast
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.14/prjc
head: d549588e3d79002f0c4b567b49644318af78a3db
commit: b1646d9ef74f7aa37c45e92fec16555680614cf7 [82/209] sched/alt: Introduce sched_cpu_topo_masks.
config: alpha-allyesconfig (attached as .config)
compiler: alpha-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/zen-kernel/zen-kernel/commit/b1646d9ef74f7aa37c45e92fe...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.14/prjc
git checkout b1646d9ef74f7aa37c45e92fec16555680614cf7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha
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 >>):
kernel/sched/alt_core.c:4421:46: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
4421 | (p->mm && attr->sched_priority > MAX_USER_RT_PRIO - 1) ||
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c:4421:46: note: each undeclared identifier is reported only once for each function it appears in
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5183:13: error: redefinition of '_cond_resched'
5183 | int __sched _cond_resched(void)
| ^~~~~~~~~~~~~
In file included from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/sched.h:1957:19: note: previous definition of '_cond_resched' with type 'int(void)'
1957 | static inline int _cond_resched(void)
| ^~~~~~~~~~~~~
kernel/sched/alt_core.c: In function '__do_sys_sched_get_priority_max':
kernel/sched/alt_core.c:5336:23: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
5336 | ret = MAX_USER_RT_PRIO-1;
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c: In function 'sched_show_task':
kernel/sched/alt_core.c:5446:16: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5446 | if (p->state == TASK_RUNNING)
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'state_filter_match':
kernel/sched/alt_core.c:5474:18: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5474 | if (!(p->state & state_filter))
| ^~~~~
| __state
kernel/sched/alt_core.c:5481:56: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5481 | if (state_filter == TASK_UNINTERRUPTIBLE && p->state == TASK_IDLE)
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5488:6: error: conflicting types for 'show_state_filter'; have 'void(long unsigned int)'
5488 | void show_state_filter(unsigned long state_filter)
| ^~~~~~~~~~~~~~~~~
In file included from kernel/sched/alt_sched.h:9,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:18:
include/linux/sched/debug.h:17:13: note: previous declaration of 'show_state_filter' with type 'void(unsigned int)'
17 | extern void show_state_filter(unsigned int state_filter);
| ^~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'init_idle':
kernel/sched/alt_core.c:5547:15: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5547 | idle->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5770:5: warning: no previous prototype for 'sched_cpu_activate' [-Wmissing-prototypes]
5770 | int sched_cpu_activate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5803:5: warning: no previous prototype for 'sched_cpu_deactivate' [-Wmissing-prototypes]
5803 | int sched_cpu_deactivate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5846:5: warning: no previous prototype for 'sched_cpu_starting' [-Wmissing-prototypes]
5846 | int sched_cpu_starting(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'sched_init_topology_cpumask':
kernel/sched/alt_core.c:5923:57: error: implicit declaration of function 'cpu_coregroup_mask' [-Werror=implicit-function-declaration]
5923 | per_cpu(sd_llc_id, cpu) = cpumask_first(cpu_coregroup_mask(cpu));
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5923:57: warning: passing argument 1 of 'cpumask_first' makes pointer from integer without a cast [-Wint-conversion]
5923 | per_cpu(sd_llc_id, cpu) = cpumask_first(cpu_coregroup_mask(cpu));
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:193:64: note: expected 'const struct cpumask *' but argument is of type 'int'
193 | static inline unsigned int cpumask_first(const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
kernel/sched/alt_core.c:5925:45: warning: passing argument 3 of 'cpumask_and' makes pointer from integer without a cast [-Wint-conversion]
5925 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5899:35: note: in definition of macro 'TOPOLOGY_CPUMASK'
5899 | if (cpumask_and(chk, chk, mask)) { \
| ^~~~
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:403:54: note: expected 'const struct cpumask *' but argument is of type 'int'
403 | const struct cpumask *src2p)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~
>> kernel/sched/alt_core.c:5925:45: warning: passing argument 2 of 'cpumask_copy' makes pointer from integer without a cast [-Wint-conversion]
5925 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5900:36: note: in definition of macro 'TOPOLOGY_CPUMASK'
5900 | cpumask_copy(topo, mask); \
| ^~~~
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:575:55: note: expected 'const struct cpumask *' but argument is of type 'int'
575 | const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
kernel/sched/alt_core.c:5925:45: warning: passing argument 2 of 'cpumask_complement' makes pointer from integer without a cast [-Wint-conversion]
5925 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5905:41: note: in definition of macro 'TOPOLOGY_CPUMASK'
5905 | cpumask_complement(chk, mask)
| ^~~~
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:458:61: note: expected 'const struct cpumask *' but argument is of type 'int'
458 | const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:6258:20: warning: no previous prototype for 'sched_create_group' [-Wmissing-prototypes]
6258 | struct task_group *sched_create_group(struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6269:6: warning: no previous prototype for 'sched_online_group' [-Wmissing-prototypes]
6269 | void sched_online_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6280:6: warning: no previous prototype for 'sched_destroy_group' [-Wmissing-prototypes]
6280 | void sched_destroy_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6286:6: warning: no previous prototype for 'sched_offline_group' [-Wmissing-prototypes]
6286 | void sched_offline_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6378:27: warning: initialized field overwritten [-Woverride-init]
6378 | .legacy_cftypes = cpu_legacy_files,
| ^~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6378:27: note: (near initialization for 'cpu_cgrp_subsys.legacy_cftypes')
cc1: some warnings being treated as errors
vim +/cpumask_copy +5925 kernel/sched/alt_core.c
f746b5817d3274 Alfred Chen 2019-08-19 5897
f746b5817d3274 Alfred Chen 2019-08-19 5898 #define TOPOLOGY_CPUMASK(name, mask, last) \
b1646d9ef74f7a Alfred Chen 2020-12-25 5899 if (cpumask_and(chk, chk, mask)) { \
b1646d9ef74f7a Alfred Chen 2020-12-25 5900 cpumask_copy(topo, mask); \
b1646d9ef74f7a Alfred Chen 2020-12-25 5901 printk(KERN_INFO "sched: cpu#%02d affinity: 0x%08lx topo: 0x%08lx - "#name,\
b1646d9ef74f7a Alfred Chen 2020-12-25 5902 cpu, (chk++)->bits[0], (topo++)->bits[0]); \
b1646d9ef74f7a Alfred Chen 2020-12-25 5903 } \
f746b5817d3274 Alfred Chen 2019-08-19 5904 if (!last) \
f746b5817d3274 Alfred Chen 2019-08-19 5905 cpumask_complement(chk, mask)
f746b5817d3274 Alfred Chen 2019-08-19 5906
f746b5817d3274 Alfred Chen 2019-08-19 5907 static void sched_init_topology_cpumask(void)
f746b5817d3274 Alfred Chen 2019-08-19 5908 {
f746b5817d3274 Alfred Chen 2019-08-19 5909 int cpu;
b1646d9ef74f7a Alfred Chen 2020-12-25 5910 cpumask_t *chk, *topo;
f746b5817d3274 Alfred Chen 2019-08-19 5911
f746b5817d3274 Alfred Chen 2019-08-19 5912 for_each_online_cpu(cpu) {
f746b5817d3274 Alfred Chen 2019-08-19 5913 /* take chance to reset time slice for idle tasks */
f746b5817d3274 Alfred Chen 2019-08-19 5914 cpu_rq(cpu)->idle->time_slice = sched_timeslice_ns;
f746b5817d3274 Alfred Chen 2019-08-19 5915
ec85ae6803b20e Alfred Chen 2020-12-04 5916 chk = per_cpu(sched_cpu_affinity_masks, cpu) + 1;
b1646d9ef74f7a Alfred Chen 2020-12-25 5917 topo = per_cpu(sched_cpu_topo_masks, cpu) + 1;
442b9acb28e362 Alfred Chen 2020-11-09 5918
f746b5817d3274 Alfred Chen 2019-08-19 5919 cpumask_complement(chk, cpumask_of(cpu));
f746b5817d3274 Alfred Chen 2019-08-19 5920 #ifdef CONFIG_SCHED_SMT
f746b5817d3274 Alfred Chen 2019-08-19 5921 TOPOLOGY_CPUMASK(smt, topology_sibling_cpumask(cpu), false);
f746b5817d3274 Alfred Chen 2019-08-19 5922 #endif
f746b5817d3274 Alfred Chen 2019-08-19 5923 per_cpu(sd_llc_id, cpu) = cpumask_first(cpu_coregroup_mask(cpu));
b1646d9ef74f7a Alfred Chen 2020-12-25 5924 per_cpu(sched_cpu_llc_mask, cpu) = topo;
f746b5817d3274 Alfred Chen 2019-08-19 @5925 TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
f746b5817d3274 Alfred Chen 2019-08-19 5926
f746b5817d3274 Alfred Chen 2019-08-19 5927 TOPOLOGY_CPUMASK(core, topology_core_cpumask(cpu), false);
f746b5817d3274 Alfred Chen 2019-08-19 5928
f746b5817d3274 Alfred Chen 2019-08-19 5929 TOPOLOGY_CPUMASK(others, cpu_online_mask, true);
f746b5817d3274 Alfred Chen 2019-08-19 5930
f746b5817d3274 Alfred Chen 2019-08-19 5931 per_cpu(sched_cpu_affinity_end_mask, cpu) = chk;
e9b96fa32fab04 Alfred Chen 2020-11-03 5932 printk(KERN_INFO "sched: cpu#%02d llc_id = %d, llc_mask idx = %d\n",
e9b96fa32fab04 Alfred Chen 2020-11-03 5933 cpu, per_cpu(sd_llc_id, cpu),
e9b96fa32fab04 Alfred Chen 2020-11-03 5934 (int) (per_cpu(sched_cpu_llc_mask, cpu) -
b1646d9ef74f7a Alfred Chen 2020-12-25 5935 per_cpu(sched_cpu_topo_masks, cpu)));
f746b5817d3274 Alfred Chen 2019-08-19 5936 }
f746b5817d3274 Alfred Chen 2019-08-19 5937 }
f746b5817d3274 Alfred Chen 2019-08-19 5938 #endif
f746b5817d3274 Alfred Chen 2019-08-19 5939
:::::: The code at line 5925 was first introduced by commit
:::::: f746b5817d3274fa4f458f87f6b452e7304b1d64 Project C v5.7.5-r2
:::::: TO: Alfred Chen <cchalpha(a)gmail.com>
:::::: CC: Alfred Chen <cchalpha(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[dhowells-fs:fscache-iter-2 41/75] fs/fscache/volume.c:286:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter-2
head: 7c7521adffeb04466a42e8e1956353b9d9038d02
commit: f463b2680fc3404d89d7186c12fbb9533e48b1cc [41/75] fscache: Replace the object management state machine
:::::: branch date: 2 days ago
:::::: commit date: 9 weeks ago
config: riscv-randconfig-c006-20210910 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-iter-2
git checkout f463b2680fc3404d89d7186c12fbb9533e48b1cc
# save the attached .config 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 <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> fs/fscache/volume.c:286:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
return volume;
^ ~~~~~~
fs/fscache/volume.c:277:7: note: 'volume' is non-null
if (!volume)
^~~~~~
fs/fscache/volume.c:277:2: note: Taking false branch
if (!volume)
^
fs/fscache/volume.c:280:2: note: Taking false branch
if (!fscache_hash_volume(volume)) {
^
fs/fscache/volume.c:285:2: note: Calling 'fscache_create_volume'
fscache_create_volume(volume, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:243:6: note: Assuming the condition is false
if (test_and_set_bit(FSCACHE_VOLUME_CREATING, &volume->flags))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:243:2: note: Taking false branch
if (test_and_set_bit(FSCACHE_VOLUME_CREATING, &volume->flags))
^
fs/fscache/volume.c:245:6: note: Assuming field 'cache_priv' is null
if (volume->cache_priv)
^~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:245:2: note: Taking false branch
if (volume->cache_priv)
^
fs/fscache/volume.c:247:6: note: Assuming the condition is false
if (!fscache_begin_cache_access(volume->cache,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:247:2: note: Taking false branch
if (!fscache_begin_cache_access(volume->cache,
^
fs/fscache/volume.c:252:6: note: Assuming the condition is true
if (!schedule_work(&volume->work))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:252:2: note: Taking true branch
if (!schedule_work(&volume->work))
^
fs/fscache/volume.c:253:3: note: Calling 'fscache_put_volume'
fscache_put_volume(volume, fscache_volume_put_create_work);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:359:6: note: 'volume' is non-null
if (volume) {
^~~~~~
fs/fscache/volume.c:359:2: note: Taking true branch
if (volume) {
^
fs/fscache/volume.c:366:7: note: 'zero' is true
if (zero)
^~~~
fs/fscache/volume.c:366:3: note: Taking true branch
if (zero)
^
fs/fscache/volume.c:367:4: note: Calling 'fscache_free_volume'
fscache_free_volume(volume);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:331:2: note: Taking false branch
if (fscache_begin_volume_access(volume, fscache_access_relinquish_volume)) {
^
fs/fscache/volume.c:343:2: note: Taking false branch
if (!hlist_bl_unhashed(&volume->hash_link))
^
fs/fscache/volume.c:348:2: note: Memory is released
kfree(volume);
^~~~~~~~~~~~~
fs/fscache/volume.c:349:2: note: Loop condition is false. Exiting loop
fscache_stat_d(&fscache_n_volumes);
^
fs/fscache/internal.h:112:30: note: expanded from macro 'fscache_stat_d'
#define fscache_stat_d(stat) do {} while (0)
^
fs/fscache/volume.c:367:4: note: Returning; memory was released via 1st parameter
fscache_free_volume(volume);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:253:3: note: Returning; memory was released via 1st parameter
fscache_put_volume(volume, fscache_volume_put_create_work);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:256:6: note: 'wait' is false
if (wait) {
^~~~
fs/fscache/volume.c:256:2: note: Taking false branch
if (wait) {
^
fs/fscache/volume.c:285:2: note: Returning; memory was released via 1st parameter
fscache_create_volume(volume, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/volume.c:286:2: note: Use of memory after it is freed
return volume;
^ ~~~~~~
vim +286 fs/fscache/volume.c
f463b2680fc340 David Howells 2020-02-06 266
f463b2680fc340 David Howells 2020-02-06 267 /*
f463b2680fc340 David Howells 2020-02-06 268 * Acquire a volume representation cookie and link it to a (proposed) cache.
f463b2680fc340 David Howells 2020-02-06 269 */
f463b2680fc340 David Howells 2020-02-06 270 struct fscache_volume *__fscache_acquire_volume(const char *volume_key,
f463b2680fc340 David Howells 2020-02-06 271 const char *cache_name,
f463b2680fc340 David Howells 2020-02-06 272 u64 coherency_data)
f463b2680fc340 David Howells 2020-02-06 273 {
f463b2680fc340 David Howells 2020-02-06 274 struct fscache_volume *volume;
f463b2680fc340 David Howells 2020-02-06 275
f463b2680fc340 David Howells 2020-02-06 276 volume = fscache_alloc_volume(volume_key, cache_name, coherency_data);
f463b2680fc340 David Howells 2020-02-06 277 if (!volume)
f463b2680fc340 David Howells 2020-02-06 278 return NULL;
f463b2680fc340 David Howells 2020-02-06 279
f463b2680fc340 David Howells 2020-02-06 280 if (!fscache_hash_volume(volume)) {
f463b2680fc340 David Howells 2020-02-06 281 fscache_put_volume(volume, fscache_volume_put_hash_collision);
f463b2680fc340 David Howells 2020-02-06 282 return NULL;
f463b2680fc340 David Howells 2020-02-06 283 }
f463b2680fc340 David Howells 2020-02-06 284
f463b2680fc340 David Howells 2020-02-06 285 fscache_create_volume(volume, false);
f463b2680fc340 David Howells 2020-02-06 @286 return volume;
f463b2680fc340 David Howells 2020-02-06 287 }
f463b2680fc340 David Howells 2020-02-06 288 EXPORT_SYMBOL(__fscache_acquire_volume);
f463b2680fc340 David Howells 2020-02-06 289
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[android-common:android12-5.4 4/9] drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4/9] ANDROID: dma-buf: system_heap: Add pagepool support to system heap
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 44008f99d9ca0793e2562967e1da01fa74ee4a41
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma-buf/heaps/ tools/virtio/vhost_test/vhost_test.ko
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
drivers/dma-buf/heaps/page_pool.c:243:5: sparse: sparse: symbol 'dmabuf_page_pool_init_shrinker' was not declared. Should it be static?
vim +/pool_shrinker +236 drivers/dma-buf/heaps/page_pool.c
bd4db96bfc247a John Stultz 2020-10-02 235
bd4db96bfc247a John Stultz 2020-10-02 @236 struct shrinker pool_shrinker = {
bd4db96bfc247a John Stultz 2020-10-02 237 .count_objects = dmabuf_page_pool_shrink_count,
bd4db96bfc247a John Stultz 2020-10-02 238 .scan_objects = dmabuf_page_pool_shrink_scan,
bd4db96bfc247a John Stultz 2020-10-02 239 .seeks = DEFAULT_SEEKS,
bd4db96bfc247a John Stultz 2020-10-02 240 .batch = 0,
bd4db96bfc247a John Stultz 2020-10-02 241 };
bd4db96bfc247a John Stultz 2020-10-02 242
:::::: The code at line 236 was first introduced by commit
:::::: bd4db96bfc247afdaf7a4cfde85fd8147522f3e6 ANDROID: dma-buf: heaps: Add a shrinker controlled page pool
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year