mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 63 participants
  • 18855 discussions
[openeuler:openEuler-1.0-LTS 9625/23811] drivers/soundwire/bus_type.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 08 Oct '24

08 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: fe38a6fef0e5f4ba9c21d3e26381987519b7edc7 [9625/23811] soundwire: fix regmap dependencies and align with other serial links config: x86_64-buildonly-randconfig-003-20240925 (https://download.01.org/0day-ci/archive/20241008/202410080128.3Ornv3xR-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241008/202410080128.3Ornv3xR-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410080128.3Ornv3xR-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/soundwire/bus_type.o: warning: objtool: missing symbol for section .init.text -- >> drivers/soundwire/intel.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 8557/23811] lib/test_sort.o: warning: objtool: missing symbol for section .text.unlikely
by kernel test robot 07 Oct '24

07 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: 775947c125d5bd6e00e0dcf9d12c57fd5d44d07f [8557/23811] asm-generic: fix -Wtype-limits compiler warnings config: x86_64-buildonly-randconfig-003-20240925 (https://download.01.org/0day-ci/archive/20241007/202410071411.kGlEzJT5-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241007/202410071411.kGlEzJT5-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410071411.kGlEzJT5-lkp@intel.com/ All warnings (new ones prefixed by >>): >> lib/test_sort.o: warning: objtool: missing symbol for section .text.unlikely -- >> lib/test_list_sort.o: warning: objtool: missing symbol for section .text.unlikely -- >> lib/test_printf.o: warning: objtool: missing symbol for section .text.unlikely -- >> drivers/hwmon/coretemp.o: warning: objtool: missing symbol for section .text.unlikely -- >> drivers/hsi/hsi_boardinfo.o: warning: objtool: missing symbol for section .text.unlikely -- drivers/mtd/nand/raw/diskonchip.c: In function 'DoC_Delay': drivers/mtd/nand/raw/diskonchip.c:220:23: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] 220 | volatile char dummy; | ^~~~~ drivers/mtd/nand/raw/diskonchip.c: In function 'doc200x_calculate_ecc': drivers/mtd/nand/raw/diskonchip.c:845:13: warning: variable 'emptymatch' set but not used [-Wunused-but-set-variable] 845 | int emptymatch = 1; | ^~~~~~~~~~ In file included from include/linux/kernel.h:14, from drivers/mtd/nand/raw/diskonchip.c:18: drivers/mtd/nand/raw/diskonchip.c: In function 'doc_probe': include/linux/printk.h:348:9: warning: this statement may fall through [-Wimplicit-fallthrough=] 348 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/nand/raw/diskonchip.c:1497:25: note: in expansion of macro 'pr_err' 1497 | pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n"); | ^~~~~~ drivers/mtd/nand/raw/diskonchip.c:1498:17: note: here 1498 | default: | ^~~~~~~ >> drivers/mtd/nand/raw/diskonchip.o: warning: objtool: missing symbol for section .text.unlikely -- kernel/events/hw_breakpoint.c:84:12: warning: no previous prototype for 'hw_breakpoint_weight' [-Wmissing-prototypes] 84 | __weak int hw_breakpoint_weight(struct perf_event *bp) | ^~~~~~~~~~~~~~~~~~~~ kernel/events/hw_breakpoint.c:232:13: warning: no previous prototype for 'arch_unregister_hw_breakpoint' [-Wmissing-prototypes] 232 | __weak void arch_unregister_hw_breakpoint(struct perf_event *bp) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/events/hw_breakpoint.c:458: warning: Function parameter or member 'context' not described in 'register_user_hw_breakpoint' kernel/events/hw_breakpoint.c:557: warning: Function parameter or member 'context' not described in 'register_wide_hw_breakpoint' >> kernel/events/hw_breakpoint.o: warning: objtool: missing symbol for section .text.unlikely -- >> drivers/thermal/intel_powerclamp.o: warning: objtool: missing symbol for section .text.unlikely -- >> drivers/clk/bcm/clk-iproc-asiu.o: warning: objtool: missing symbol for section .text.unlikely -- >> drivers/clk/renesas/clk-div6.o: warning: objtool: missing symbol for section .text.unlikely -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6] dma-buf: heaps: Fix off-by-one in CMA heap fault handler
by Xiongfeng Wang 07 Oct '24

07 Oct '24
From: "T.J. Mercier" <tjmercier(a)google.com> stable inclusion from stable-v6.6.52 commit eb7fc8b65cea22f9038c52398c8b22849e9620ea category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAU9M8 CVE: CVE-2024-46852 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit ea5ff5d351b520524019f7ff7f9ce418de2dad87 upstream. Until VM_DONTEXPAND was added in commit 1c1914d6e8c6 ("dma-buf: heaps: Don't track CMA dma-buf pages under RssFile") it was possible to obtain a mapping larger than the buffer size via mremap and bypass the overflow check in dma_buf_mmap_internal. When using such a mapping to attempt to fault past the end of the buffer, the CMA heap fault handler also checks the fault offset against the buffer size, but gets the boundary wrong by 1. Fix the boundary check so that we don't read off the end of the pages array and insert an arbitrary page in the mapping. Reported-by: Xingyu Jin <xingyuj(a)google.com> Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation") Cc: stable(a)vger.kernel.org # Applicable >= 5.10. Needs adjustments only for 5.10. Signed-off-by: T.J. Mercier <tjmercier(a)google.com> Acked-by: John Stultz <jstultz(a)google.com> Signed-off-by: Sumit Semwal <sumit.semwal(a)linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240830192627.2546033-1-tjme… Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com> --- drivers/dma-buf/heaps/cma_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c index ee899f8e6721..bea7e574f916 100644 --- a/drivers/dma-buf/heaps/cma_heap.c +++ b/drivers/dma-buf/heaps/cma_heap.c @@ -165,7 +165,7 @@ static vm_fault_t cma_heap_vm_fault(struct vm_fault *vmf) struct vm_area_struct *vma = vmf->vma; struct cma_heap_buffer *buffer = vma->vm_private_data; - if (vmf->pgoff > buffer->pagecount) + if (vmf->pgoff >= buffer->pagecount) return VM_FAULT_SIGBUS; vmf->page = buffer->pages[vmf->pgoff]; -- 2.20.1
2 1
0 0
[openeuler:openEuler-1.0-LTS 8452/23811] kernel/ktask.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 07 Oct '24

07 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: c48676ef6b6f9cb8497d6264ae9ff71b87630337 [8452/23811] ktask: multithread CPU-intensive kernel work config: x86_64-buildonly-randconfig-003-20240925 (https://download.01.org/0day-ci/archive/20241007/202410070443.gzxmSrdz-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241007/202410070443.gzxmSrdz-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410070443.gzxmSrdz-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/ktask.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 6661/23811] kernel/signal.o: warning: objtool: missing symbol for section .text.unlikely
by kernel test robot 06 Oct '24

06 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: f1bfcb97c436ae547c2889f3a25d74d85867e09f [6661/23811] kernel/signal.c: trace_signal_deliver when signal_group_exit config: x86_64-buildonly-randconfig-003-20240925 (https://download.01.org/0day-ci/archive/20241006/202410062155.gpahLOpk-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241006/202410062155.gpahLOpk-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410062155.gpahLOpk-lkp@intel.com/ All warnings (new ones prefixed by >>): include/linux/signal.h:128:9: note: here 128 | case 2: \ | ^~~~ include/linux/signal.h:141:1: note: in expansion of macro '_SIG_SET_BINOP' 141 | _SIG_SET_BINOP(sigorsets, _sig_or) | ^~~~~~~~~~~~~~ include/linux/signal.h:130:27: warning: this statement may fall through [-Wimplicit-fallthrough=] 130 | r->sig[1] = op(a1, b1); \ | ^ include/linux/signal.h:141:1: note: in expansion of macro '_SIG_SET_BINOP' 141 | _SIG_SET_BINOP(sigorsets, _sig_or) | ^~~~~~~~~~~~~~ include/linux/signal.h:131:9: note: here 131 | case 1: \ | ^~~~ include/linux/signal.h:141:1: note: in expansion of macro '_SIG_SET_BINOP' 141 | _SIG_SET_BINOP(sigorsets, _sig_or) | ^~~~~~~~~~~~~~ include/linux/signal.h: In function 'sigandsets': include/linux/signal.h:127:27: warning: this statement may fall through [-Wimplicit-fallthrough=] 127 | r->sig[2] = op(a2, b2); \ | ^ include/linux/signal.h:144:1: note: in expansion of macro '_SIG_SET_BINOP' 144 | _SIG_SET_BINOP(sigandsets, _sig_and) | ^~~~~~~~~~~~~~ include/linux/signal.h:128:9: note: here 128 | case 2: \ | ^~~~ include/linux/signal.h:144:1: note: in expansion of macro '_SIG_SET_BINOP' 144 | _SIG_SET_BINOP(sigandsets, _sig_and) | ^~~~~~~~~~~~~~ include/linux/signal.h:130:27: warning: this statement may fall through [-Wimplicit-fallthrough=] 130 | r->sig[1] = op(a1, b1); \ | ^ include/linux/signal.h:144:1: note: in expansion of macro '_SIG_SET_BINOP' 144 | _SIG_SET_BINOP(sigandsets, _sig_and) | ^~~~~~~~~~~~~~ include/linux/signal.h:131:9: note: here 131 | case 1: \ | ^~~~ include/linux/signal.h:144:1: note: in expansion of macro '_SIG_SET_BINOP' 144 | _SIG_SET_BINOP(sigandsets, _sig_and) | ^~~~~~~~~~~~~~ include/linux/signal.h: In function 'sigandnsets': include/linux/signal.h:127:27: warning: this statement may fall through [-Wimplicit-fallthrough=] 127 | r->sig[2] = op(a2, b2); \ | ^ include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP' 147 | _SIG_SET_BINOP(sigandnsets, _sig_andn) | ^~~~~~~~~~~~~~ include/linux/signal.h:128:9: note: here 128 | case 2: \ | ^~~~ include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP' 147 | _SIG_SET_BINOP(sigandnsets, _sig_andn) | ^~~~~~~~~~~~~~ include/linux/signal.h:130:27: warning: this statement may fall through [-Wimplicit-fallthrough=] 130 | r->sig[1] = op(a1, b1); \ | ^ include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP' 147 | _SIG_SET_BINOP(sigandnsets, _sig_andn) | ^~~~~~~~~~~~~~ include/linux/signal.h:131:9: note: here 131 | case 1: \ | ^~~~ include/linux/signal.h:147:1: note: in expansion of macro '_SIG_SET_BINOP' 147 | _SIG_SET_BINOP(sigandnsets, _sig_andn) | ^~~~~~~~~~~~~~ kernel/signal.c: In function 'check_kill_permission': kernel/signal.c:830:34: warning: this statement may fall through [-Wimplicit-fallthrough=] 830 | if (!sid || sid == task_session(current)) | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/signal.c:832:17: note: here 832 | default: | ^~~~~~~ include/linux/signal.h: In function 'signotset': include/linux/signal.h:159:29: warning: this statement may fall through [-Wimplicit-fallthrough=] 159 | set->sig[2] = op(set->sig[2]); \ | ^ include/linux/signal.h:169:1: note: in expansion of macro '_SIG_SET_OP' 169 | _SIG_SET_OP(signotset, _sig_not) | ^~~~~~~~~~~ include/linux/signal.h:160:9: note: here 160 | case 2: set->sig[1] = op(set->sig[1]); \ | ^~~~ include/linux/signal.h:169:1: note: in expansion of macro '_SIG_SET_OP' 169 | _SIG_SET_OP(signotset, _sig_not) | ^~~~~~~~~~~ include/linux/signal.h:160:29: warning: this statement may fall through [-Wimplicit-fallthrough=] 160 | case 2: set->sig[1] = op(set->sig[1]); \ | ^ include/linux/signal.h:169:1: note: in expansion of macro '_SIG_SET_OP' 169 | _SIG_SET_OP(signotset, _sig_not) | ^~~~~~~~~~~ include/linux/signal.h:161:9: note: here 161 | case 1: set->sig[0] = op(set->sig[0]); \ | ^~~~ include/linux/signal.h:169:1: note: in expansion of macro '_SIG_SET_OP' 169 | _SIG_SET_OP(signotset, _sig_not) | ^~~~~~~~~~~ >> kernel/signal.o: warning: objtool: missing symbol for section .text.unlikely -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 3328/23811] drivers/char/ipmi/ipmi_si_intf.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 06 Oct '24

06 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: 221a9ce1bd3b42ba2226d22663110aed96ae471b [3328/23811] ipmi_si: Fix crash when using hard-coded device config: x86_64-buildonly-randconfig-003-20240925 (https://download.01.org/0day-ci/archive/20241006/202410060723.NM8MwCWb-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241006/202410060723.NM8MwCWb-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410060723.NM8MwCWb-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/char/ipmi/ipmi_si_intf.c:22: include/linux/module.h:133:13: warning: 'init_module' specifies less restrictive attribute than its target 'init_ipmi_si': 'cold' [-Wmissing-attributes] 133 | int init_module(void) __attribute__((alias(#initfn))); | ^~~~~~~~~~~ drivers/char/ipmi/ipmi_si_intf.c:2175:1: note: in expansion of macro 'module_init' 2175 | module_init(init_ipmi_si); | ^~~~~~~~~~~ drivers/char/ipmi/ipmi_si_intf.c:2109:19: note: 'init_module' target declared here 2109 | static int __init init_ipmi_si(void) | ^~~~~~~~~~~~ >> drivers/char/ipmi/ipmi_si_intf.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 6289/23811] drivers/scsi/hisi_sas/hisi_sas_main.c:2888:9: sparse: sparse: symbol 'hisi_sas_debugfs_bist_linkrate_write' was not declared. Should it be static?
by kernel test robot 04 Oct '24

04 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: 7add7cc0243793dca7bdeeb53c37212a87076c69 [6289/23811] hisi_sas: add the bist loopback feature. config: arm64-randconfig-r111-20241003 (https://download.01.org/0day-ci/archive/20241004/202410041051.A286AcSf-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20241004/202410041051.A286AcSf-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410041051.A286AcSf-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/scsi/hisi_sas/hisi_sas_main.c:1660:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1660:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1660:52: sparse: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:1917:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1917:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1917:52: sparse: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:2800:12: sparse: sparse: symbol 'hisi_sas_debugfs_to_reg_name' was not declared. Should it be static? drivers/scsi/hisi_sas/hisi_sas_main.c:2827:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2827:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2827:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2827:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2827:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2827:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2830:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2830:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2830:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2830:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2830:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2830:36: sparse: sparse: cast to restricted __le32 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2888:9: sparse: sparse: symbol 'hisi_sas_debugfs_bist_linkrate_write' was not declared. Should it be static? >> drivers/scsi/hisi_sas/hisi_sas_main.c:2979:9: sparse: sparse: symbol 'hisi_sas_debugfs_bist_code_mode_write' was not declared. Should it be static? >> drivers/scsi/hisi_sas/hisi_sas_main.c:3034:9: sparse: sparse: symbol 'hisi_sas_debugfs_bist_phy_write' was not declared. Should it be static? >> drivers/scsi/hisi_sas/hisi_sas_main.c:3120:9: sparse: sparse: symbol 'hisi_sas_debugfs_bist_mode_write' was not declared. Should it be static? >> drivers/scsi/hisi_sas/hisi_sas_main.c:3174:9: sparse: sparse: symbol 'hisi_sas_debugfs_bist_enable_write' was not declared. Should it be static? drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3277:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:3296:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:3296:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:3296:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:3296:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:3296:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:3296:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2801:1: warning: no previous prototype for 'hisi_sas_debugfs_to_reg_name' [-Wmissing-prototypes] 2801 | hisi_sas_debugfs_to_reg_name(int off, int base_off, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c:2888:9: warning: no previous prototype for 'hisi_sas_debugfs_bist_linkrate_write' [-Wmissing-prototypes] 2888 | ssize_t hisi_sas_debugfs_bist_linkrate_write(struct file *filp, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c:2979:9: warning: no previous prototype for 'hisi_sas_debugfs_bist_code_mode_write' [-Wmissing-prototypes] 2979 | ssize_t hisi_sas_debugfs_bist_code_mode_write(struct file *filp, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c:3034:9: warning: no previous prototype for 'hisi_sas_debugfs_bist_phy_write' [-Wmissing-prototypes] 3034 | ssize_t hisi_sas_debugfs_bist_phy_write(struct file *filp, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c:3120:9: warning: no previous prototype for 'hisi_sas_debugfs_bist_mode_write' [-Wmissing-prototypes] 3120 | ssize_t hisi_sas_debugfs_bist_mode_write(struct file *filp, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c:3174:9: warning: no previous prototype for 'hisi_sas_debugfs_bist_enable_write' [-Wmissing-prototypes] 3174 | ssize_t hisi_sas_debugfs_bist_enable_write(struct file *filp, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/scsi/libsas.h:36, from include/scsi/sas_ata.h:29, from drivers/scsi/hisi_sas/hisi_sas.h:29, from drivers/scsi/hisi_sas/hisi_sas_main.c:12: In function 'scsi_prot_sglist', inlined from 'hisi_sas_dif_dma_map' at drivers/scsi/hisi_sas/hisi_sas_main.c:448:2: include/scsi/scsi_cmnd.h:333:19: warning: 'scsi_cmnd' may be used uninitialized [-Wmaybe-uninitialized] 333 | return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL; | ~~~^~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c: In function 'hisi_sas_dif_dma_map': drivers/scsi/hisi_sas/hisi_sas_main.c:418:27: note: 'scsi_cmnd' was declared here 418 | struct scsi_cmnd *scsi_cmnd; | ^~~~~~~~~ In file included from include/asm-generic/preempt.h:5, from ./arch/arm64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:81, from include/linux/spinlock.h:51, from include/linux/mmzone.h:9, from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/resource_ext.h:19, from include/linux/acpi.h:26, from drivers/scsi/hisi_sas/hisi_sas.h:15: In function 'check_object_size', inlined from 'check_copy_size' at include/linux/thread_info.h:150:2, inlined from 'copy_from_user' at include/linux/uaccess.h:143:6, inlined from 'hisi_sas_debugfs_trigger_dump_write' at drivers/scsi/hisi_sas/hisi_sas_main.c:3550:6: include/linux/thread_info.h:119:17: warning: 'buf' may be used uninitialized [-Wmaybe-uninitialized] 119 | __check_object_size(ptr, n, to_user); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/thread_info.h: In function 'hisi_sas_debugfs_trigger_dump_write': include/linux/thread_info.h:112:13: note: by argument 1 of type 'const void *' to '__check_object_size' declared here 112 | extern void __check_object_size(const void *ptr, unsigned long n, | ^~~~~~~~~~~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c:3537:12: note: 'buf' declared here 3537 | u8 buf[8]; | ^~~ vim +/hisi_sas_debugfs_bist_linkrate_write +2888 drivers/scsi/hisi_sas/hisi_sas_main.c 2887 > 2888 ssize_t hisi_sas_debugfs_bist_linkrate_write(struct file *filp, 2889 const char __user *buf, 2890 size_t count, loff_t *ppos) 2891 { 2892 struct seq_file *m = filp->private_data; 2893 struct hisi_hba *hisi_hba = m->private; 2894 char kbuf[16] = {}, *pkbuf; 2895 bool found = false; 2896 int i; 2897 2898 if (hisi_hba->bist_loopback_enable) 2899 return -EINVAL; 2900 2901 if (count >= sizeof(kbuf)) 2902 return -EINVAL; 2903 2904 if (copy_from_user(kbuf, buf, count)) 2905 return -EINVAL; 2906 2907 pkbuf = strstrip(kbuf); 2908 2909 for (i = 0; i < ARRAY_SIZE(hisi_sas_debugfs_loop_linkrate); i++) { 2910 if (!strncmp(hisi_sas_debugfs_loop_linkrate[i].name, 2911 pkbuf, 16)) { 2912 hisi_hba->bist_loopback_linkrate = 2913 hisi_sas_debugfs_loop_linkrate[i].value; 2914 found = true; 2915 break; 2916 } 2917 } 2918 2919 if (!found) { 2920 dev_err(hisi_hba->dev, "unknown mode\n"); 2921 return -EINVAL; 2922 } 2923 2924 return count; 2925 } 2926 2927 static int hisi_sas_debugfs_bist_linkrate_open(struct inode *inode, 2928 struct file *filp) 2929 { 2930 return single_open(filp, hisi_sas_debugfs_bist_linkrate_show, 2931 inode->i_private); 2932 } 2933 2934 static const struct file_operations hisi_sas_debugfs_bist_linkrate_ops = { 2935 .open = hisi_sas_debugfs_bist_linkrate_open, 2936 .read = seq_read, 2937 .write = hisi_sas_debugfs_bist_linkrate_write, 2938 .llseek = seq_lseek, 2939 .release = single_release, 2940 .owner = THIS_MODULE, 2941 }; 2942 2943 static struct { 2944 int value; 2945 char *name; 2946 } hisi_sas_debugfs_loop_code_mode[] = { 2947 { HISI_SAS_BIST_CODE_MODE_PRBS7, "PRBS7" }, 2948 { HISI_SAS_BIST_CODE_MODE_PRBS23, "PRBS23" }, 2949 { HISI_SAS_BIST_CODE_MODE_PRBS31, "PRBS31" }, 2950 { HISI_SAS_BIST_CODE_MODE_JTPAT, "JTPAT" }, 2951 { HISI_SAS_BIST_CODE_MODE_CJTPAT, "CJTPAT" }, 2952 { HISI_SAS_BIST_CODE_MODE_SCRAMBED_0, "SCRAMBED_0" }, 2953 { HISI_SAS_BIST_CODE_MODE_TRAIN, "TRAIN" }, 2954 { HISI_SAS_BIST_CODE_MODE_TRAIN_DONE, "TRAIN_DONE" }, 2955 { HISI_SAS_BIST_CODE_MODE_HFTP, "HFTP" }, 2956 { HISI_SAS_BIST_CODE_MODE_MFTP, "MFTP" }, 2957 { HISI_SAS_BIST_CODE_MODE_LFTP, "LFTP" }, 2958 { HISI_SAS_BIST_CODE_MODE_FIXED_DATA, "FIXED_DATA" }, 2959 }; 2960 2961 static int hisi_sas_debugfs_bist_code_mode_show(struct seq_file *s, void *p) 2962 { 2963 struct hisi_hba *hisi_hba = s->private; 2964 int i; 2965 2966 for (i = 0; i < ARRAY_SIZE(hisi_sas_debugfs_loop_code_mode); i++) { 2967 int match = (hisi_hba->bist_loopback_code_mode == 2968 hisi_sas_debugfs_loop_code_mode[i].value); 2969 2970 seq_printf(s, "%s%s%s ", match ? "[" : "", 2971 hisi_sas_debugfs_loop_code_mode[i].name, 2972 match ? "]" : ""); 2973 } 2974 seq_puts(s, "\n"); 2975 2976 return 0; 2977 } 2978 > 2979 ssize_t hisi_sas_debugfs_bist_code_mode_write(struct file *filp, 2980 const char __user *buf, 2981 size_t count, loff_t *ppos) 2982 { 2983 struct seq_file *m = filp->private_data; 2984 struct hisi_hba *hisi_hba = m->private; 2985 char kbuf[16] = {}, *pkbuf; 2986 bool found = false; 2987 int i; 2988 2989 if (hisi_hba->bist_loopback_enable) 2990 return -EINVAL; 2991 2992 if (count >= sizeof(kbuf)) 2993 return -EINVAL; 2994 2995 if (copy_from_user(kbuf, buf, count)) 2996 return -EINVAL; 2997 2998 pkbuf = strstrip(kbuf); 2999 3000 for (i = 0; i < ARRAY_SIZE(hisi_sas_debugfs_loop_code_mode); i++) { 3001 if (!strncmp(hisi_sas_debugfs_loop_code_mode[i].name, 3002 pkbuf, 16)) { 3003 hisi_hba->bist_loopback_code_mode = 3004 hisi_sas_debugfs_loop_code_mode[i].value; 3005 found = true; 3006 break; 3007 } 3008 } 3009 3010 if (!found) { 3011 dev_err(hisi_hba->dev, "unknown mode\n"); 3012 return -EINVAL; 3013 } 3014 3015 return count; 3016 } 3017 3018 static int hisi_sas_debugfs_bist_code_mode_open(struct inode *inode, 3019 struct file *filp) 3020 { 3021 return single_open(filp, hisi_sas_debugfs_bist_code_mode_show, 3022 inode->i_private); 3023 } 3024 3025 static const struct file_operations hisi_sas_debugfs_bist_code_mode_ops = { 3026 .open = hisi_sas_debugfs_bist_code_mode_open, 3027 .read = seq_read, 3028 .write = hisi_sas_debugfs_bist_code_mode_write, 3029 .llseek = seq_lseek, 3030 .release = single_release, 3031 .owner = THIS_MODULE, 3032 }; 3033 > 3034 ssize_t hisi_sas_debugfs_bist_phy_write(struct file *filp, 3035 const char __user *buf, 3036 size_t count, loff_t *ppos) 3037 { 3038 struct seq_file *m = filp->private_data; 3039 struct hisi_hba *hisi_hba = m->private; 3040 char kbuf[16] = {}, *pkbuf; 3041 int val, phy; 3042 3043 if (hisi_hba->bist_loopback_enable) 3044 return -EINVAL; 3045 3046 if (count >= sizeof(kbuf)) 3047 return -EINVAL; 3048 3049 if (copy_from_user(kbuf, buf, count)) 3050 return -EINVAL; 3051 3052 pkbuf = strstrip(kbuf); 3053 3054 val = kstrtoint(pkbuf, 0, &phy); 3055 if (val < 0) 3056 return val; 3057 3058 if (phy >= hisi_hba->n_phy) { 3059 dev_err(hisi_hba->dev, "phy index %d exceeds limit\n", phy); 3060 return -EINVAL; 3061 } 3062 3063 hisi_hba->bist_loopback_phy_id = phy; 3064 3065 return count; 3066 } 3067 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 3349/23811] drivers/scsi/hisi_sas/hisi_sas_main.c:2711:12: sparse: sparse: symbol 'hisi_sas_debugfs_to_reg_name' was not declared. Should it be static?
by kernel test robot 04 Oct '24

04 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: 82153b96f94df7483e215df3057befe744915991 [3349/23811] scsi: hisi_sas: Sync upstream version of DFX feature code config: arm64-randconfig-r111-20241003 (https://download.01.org/0day-ci/archive/20241004/202410040809.szghfgF1-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20241004/202410040809.szghfgF1-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410040809.szghfgF1-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/scsi/hisi_sas/hisi_sas_main.c:1623:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1623:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1623:52: sparse: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:1871:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1871:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1871:52: sparse: got restricted __le16 [usertype] >> drivers/scsi/hisi_sas/hisi_sas_main.c:2711:12: sparse: sparse: symbol 'hisi_sas_debugfs_to_reg_name' was not declared. Should it be static? drivers/scsi/hisi_sas/hisi_sas_main.c:2738:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2738:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2738:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2738:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2738:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2738:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2741:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2741:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2741:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2741:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2741:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2741:36: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2805:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2823:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2823:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2823:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2823:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2823:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2823:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2712:1: warning: no previous prototype for 'hisi_sas_debugfs_to_reg_name' [-Wmissing-prototypes] 2712 | hisi_sas_debugfs_to_reg_name(int off, int base_off, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/scsi/libsas.h:36, from include/scsi/sas_ata.h:29, from drivers/scsi/hisi_sas/hisi_sas.h:28, from drivers/scsi/hisi_sas/hisi_sas_main.c:12: In function 'scsi_prot_sglist', inlined from 'hisi_sas_dif_dma_map' at drivers/scsi/hisi_sas/hisi_sas_main.c:443:2: include/scsi/scsi_cmnd.h:327:19: warning: 'scsi_cmnd' may be used uninitialized [-Wmaybe-uninitialized] 327 | return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL; | ~~~^~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c: In function 'hisi_sas_dif_dma_map': drivers/scsi/hisi_sas/hisi_sas_main.c:413:27: note: 'scsi_cmnd' was declared here 413 | struct scsi_cmnd *scsi_cmnd; | ^~~~~~~~~ vim +/hisi_sas_debugfs_to_reg_name +2711 drivers/scsi/hisi_sas/hisi_sas_main.c 2710 > 2711 const char * 2712 hisi_sas_debugfs_to_reg_name(int off, int base_off, 2713 const struct hisi_sas_debugfs_reg_lu *lu) 2714 { 2715 for (; lu->name; lu++) { 2716 if (off == lu->off - base_off) 2717 return lu->name; 2718 } 2719 2720 return NULL; 2721 } 2722 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1571/23811] drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64
by kernel test robot 04 Oct '24

04 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: 5674e8c212d6087835d2a77b9bb7c26f03413d84 [1571/23811] scsi: hisi_sas: Add DFX Feature: IOST create file and add file operations config: arm64-randconfig-r111-20241003 (https://download.01.org/0day-ci/archive/20241004/202410040525.qH3EJS90-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20241004/202410040525.qH3EJS90-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410040525.qH3EJS90-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/scsi/hisi_sas/hisi_sas_main.c:1603:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1603:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1603:52: sparse: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:1857:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1857:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1857:52: sparse: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:2664:12: sparse: sparse: symbol 'hisi_sas_reg_name' was not declared. Should it be static? drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2762:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2762:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2762:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2762:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2762:42: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2762:42: sparse: sparse: cast to restricted __le32 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 >> drivers/scsi/hisi_sas/hisi_sas_main.c:2864:45: sparse: sparse: cast to restricted __le64 drivers/scsi/hisi_sas/hisi_sas_main.c:2664:13: warning: no previous prototype for 'hisi_sas_reg_name' [-Wmissing-prototypes] 2664 | const char *hisi_sas_reg_name(int off, | ^~~~~~~~~~~~~~~~~ In file included from include/scsi/libsas.h:36, from include/scsi/sas_ata.h:29, from drivers/scsi/hisi_sas/hisi_sas.h:28, from drivers/scsi/hisi_sas/hisi_sas_main.c:12: In function 'scsi_prot_sglist', inlined from 'hisi_sas_dif_dma_map' at drivers/scsi/hisi_sas/hisi_sas_main.c:442:2: include/scsi/scsi_cmnd.h:327:19: warning: 'scsi_cmnd' may be used uninitialized [-Wmaybe-uninitialized] 327 | return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL; | ~~~^~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c: In function 'hisi_sas_dif_dma_map': drivers/scsi/hisi_sas/hisi_sas_main.c:412:27: note: 'scsi_cmnd' was declared here 412 | struct scsi_cmnd *scsi_cmnd; | ^~~~~~~~~ vim +2864 drivers/scsi/hisi_sas/hisi_sas_main.c 2853 2854 static int hisi_sas_show_row_64(struct seq_file *s, 2855 int index, 2856 int sz, 2857 u64 *ptr) 2858 { 2859 int i; 2860 2861 /* completion header size not fixed per HW version */ 2862 seq_printf(s, "index %04d:\n\t", index); 2863 for (i = 1; i <= sz / 8; i++, ptr++) { > 2864 seq_printf(s, " 0x%016llx", le64_to_cpu(*ptr)); 2865 /* when print 4 character , new a line */ 2866 if (!(i % 4)) 2867 seq_puts(s, "\n\t"); 2868 } 2869 2870 seq_puts(s, "\n"); 2871 2872 return 0; 2873 } 2874 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 21385/23811] drivers/tee/optee/core.c:618:31: sparse: sparse: incorrect type in return expression (different base types)
by kernel test robot 04 Oct '24

04 Oct '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: 595311cf7e49c781dd26782e4b45fd54bbfb3e40 [21385/23811] optee: model OP-TEE as a platform device/driver config: arm64-randconfig-r121-20241003 (https://download.01.org/0day-ci/archive/20241004/202410040450.NkRme0Yj-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20241004/202410040450.NkRme0Yj-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410040450.NkRme0Yj-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/tee/optee/core.c:618:31: sparse: sparse: incorrect type in return expression (different base types) @@ expected int @@ got void * @@ drivers/tee/optee/core.c:618:31: sparse: expected int drivers/tee/optee/core.c:618:31: sparse: got void * drivers/tee/optee/core.c: In function 'optee_probe': drivers/tee/optee/core.c:618:24: warning: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] 618 | return ERR_PTR(-EINVAL); | ^~~~~~~~~~~~~~~~ vim +618 drivers/tee/optee/core.c 595311cf7e49c7 Ard Biesheuvel 2019-12-09 581 595311cf7e49c7 Ard Biesheuvel 2019-12-09 582 static int optee_probe(struct platform_device *pdev) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 583 { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 584 optee_invoke_fn *invoke_fn; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 585 struct tee_shm_pool *pool; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 586 struct optee *optee = NULL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 587 void *memremaped_shm = NULL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 588 struct tee_device *teedev; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 589 u32 sec_caps; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 590 int rc; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 591 595311cf7e49c7 Ard Biesheuvel 2019-12-09 592 invoke_fn = get_invoke_func(&pdev->dev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 593 if (IS_ERR(invoke_fn)) 595311cf7e49c7 Ard Biesheuvel 2019-12-09 594 return PTR_ERR(invoke_fn); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 595 4fb0a5eb364d23 Jens Wiklander 2015-04-14 596 if (!optee_msg_api_uid_is_optee_api(invoke_fn)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 597 pr_warn("api uid mismatch\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 598 return -EINVAL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 599 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 600 5c5f80307ab27c Jérôme Forissier 2017-11-24 601 optee_msg_get_os_revision(invoke_fn); 5c5f80307ab27c Jérôme Forissier 2017-11-24 602 4fb0a5eb364d23 Jens Wiklander 2015-04-14 603 if (!optee_msg_api_revision_is_compatible(invoke_fn)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 604 pr_warn("api revision mismatch\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 605 return -EINVAL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 606 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 607 4fb0a5eb364d23 Jens Wiklander 2015-04-14 608 if (!optee_msg_exchange_capabilities(invoke_fn, &sec_caps)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 609 pr_warn("capabilities mismatch\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 610 return -EINVAL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 611 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 612 4fb0a5eb364d23 Jens Wiklander 2015-04-14 613 /* 4fb0a5eb364d23 Jens Wiklander 2015-04-14 614 * We have no other option for shared memory, if secure world 4fb0a5eb364d23 Jens Wiklander 2015-04-14 615 * doesn't have any reserved memory we can use we can't continue. 4fb0a5eb364d23 Jens Wiklander 2015-04-14 616 */ 4fb0a5eb364d23 Jens Wiklander 2015-04-14 617 if (!(sec_caps & OPTEE_SMC_SEC_CAP_HAVE_RESERVED_SHM)) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 @618 return ERR_PTR(-EINVAL); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 619 f58e236c9d665a Volodymyr Babchuk 2017-11-29 620 pool = optee_config_shm_memremap(invoke_fn, &memremaped_shm, sec_caps); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 621 if (IS_ERR(pool)) 595311cf7e49c7 Ard Biesheuvel 2019-12-09 622 return PTR_ERR(pool); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 623 4fb0a5eb364d23 Jens Wiklander 2015-04-14 624 optee = kzalloc(sizeof(*optee), GFP_KERNEL); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 625 if (!optee) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 626 rc = -ENOMEM; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 627 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 628 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 629 4fb0a5eb364d23 Jens Wiklander 2015-04-14 630 optee->invoke_fn = invoke_fn; d885cc5e0759fc Volodymyr Babchuk 2017-11-29 631 optee->sec_caps = sec_caps; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 632 4fb0a5eb364d23 Jens Wiklander 2015-04-14 633 teedev = tee_device_alloc(&optee_desc, NULL, pool, optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 634 if (IS_ERR(teedev)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 635 rc = PTR_ERR(teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 636 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 637 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 638 optee->teedev = teedev; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 639 4fb0a5eb364d23 Jens Wiklander 2015-04-14 640 teedev = tee_device_alloc(&optee_supp_desc, NULL, pool, optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 641 if (IS_ERR(teedev)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 642 rc = PTR_ERR(teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 643 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 644 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 645 optee->supp_teedev = teedev; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 646 4fb0a5eb364d23 Jens Wiklander 2015-04-14 647 rc = tee_device_register(optee->teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 648 if (rc) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 649 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 650 4fb0a5eb364d23 Jens Wiklander 2015-04-14 651 rc = tee_device_register(optee->supp_teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 652 if (rc) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 653 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 654 4fb0a5eb364d23 Jens Wiklander 2015-04-14 655 mutex_init(&optee->call_queue.mutex); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 656 INIT_LIST_HEAD(&optee->call_queue.waiters); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 657 optee_wait_queue_init(&optee->wait_queue); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 658 optee_supp_init(&optee->supp); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 659 optee->memremaped_shm = memremaped_shm; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 660 optee->pool = pool; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 661 4fb0a5eb364d23 Jens Wiklander 2015-04-14 662 optee_enable_shm_cache(optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 663 595311cf7e49c7 Ard Biesheuvel 2019-12-09 664 platform_set_drvdata(pdev, optee); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 665 4fb0a5eb364d23 Jens Wiklander 2015-04-14 666 pr_info("initialized driver\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 667 return 0; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 668 err: 4fb0a5eb364d23 Jens Wiklander 2015-04-14 669 if (optee) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 670 /* 4fb0a5eb364d23 Jens Wiklander 2015-04-14 671 * tee_device_unregister() is safe to call even if the 4fb0a5eb364d23 Jens Wiklander 2015-04-14 672 * devices hasn't been registered with 4fb0a5eb364d23 Jens Wiklander 2015-04-14 673 * tee_device_register() yet. 4fb0a5eb364d23 Jens Wiklander 2015-04-14 674 */ 4fb0a5eb364d23 Jens Wiklander 2015-04-14 675 tee_device_unregister(optee->supp_teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 676 tee_device_unregister(optee->teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 677 kfree(optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 678 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 679 if (pool) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 680 tee_shm_pool_free(pool); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 681 if (memremaped_shm) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 682 memunmap(memremaped_shm); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 683 return rc; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 684 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 685 :::::: The code at line 618 was first introduced by commit :::::: 4fb0a5eb364d239722e745c02aef0dbd4e0f1ad2 tee: add OP-TEE driver :::::: TO: Jens Wiklander <jens.wiklander(a)linaro.org> :::::: CC: Jens Wiklander <jens.wiklander(a)linaro.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 564
  • 565
  • 566
  • 567
  • 568
  • 569
  • 570
  • ...
  • 1886
  • Older →

HyperKitty Powered by HyperKitty