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

  • 55 participants
  • 18787 discussions
[PATCH OLK-6.6] perf/x86/intel: Limit the period on Haswell
by Li Huafei 08 Oct '24

08 Oct '24
From: Kan Liang <kan.liang(a)linux.intel.com> stable inclusion from stable-v6.6.51 commit 0eaf812aa1506704f3b78be87036860e5d0fe81d category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IR511 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 25dfc9e357af8aed1ca79b318a73f2c59c1f0b2b upstream. Running the ltp test cve-2015-3290 concurrently reports the following warnings. perfevents: irq loop stuck! WARNING: CPU: 31 PID: 32438 at arch/x86/events/intel/core.c:3174 intel_pmu_handle_irq+0x285/0x370 Call Trace: <NMI> ? __warn+0xa4/0x220 ? intel_pmu_handle_irq+0x285/0x370 ? __report_bug+0x123/0x130 ? intel_pmu_handle_irq+0x285/0x370 ? __report_bug+0x123/0x130 ? intel_pmu_handle_irq+0x285/0x370 ? report_bug+0x3e/0xa0 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x50 ? asm_exc_invalid_op+0x1a/0x20 ? irq_work_claim+0x1e/0x40 ? intel_pmu_handle_irq+0x285/0x370 perf_event_nmi_handler+0x3d/0x60 nmi_handle+0x104/0x330 Thanks to Thomas Gleixner's analysis, the issue is caused by the low initial period (1) of the frequency estimation algorithm, which triggers the defects of the HW, specifically erratum HSW11 and HSW143. (For the details, please refer https://lore.kernel.org/lkml/87plq9l5d2.ffs@tglx/) The HSW11 requires a period larger than 100 for the INST_RETIRED.ALL event, but the initial period in the freq mode is 1. The erratum is the same as the BDM11, which has been supported in the kernel. A minimum period of 128 is enforced as well on HSW. HSW143 is regarding that the fixed counter 1 may overcount 32 with the Hyper-Threading is enabled. However, based on the test, the hardware has more issues than it tells. Besides the fixed counter 1, the message 'interrupt took too long' can be observed on any counter which was armed with a period < 32 and two events expired in the same NMI. A minimum period of 32 is enforced for the rest of the events. The recommended workaround code of the HSW143 is not implemented. Because it only addresses the issue for the fixed counter. It brings extra overhead through extra MSR writing. No related overcounting issue has been reported so far. Fixes: 3a632cb229bf ("perf/x86/intel: Add simple Haswell PMU support") Reported-by: Li Huafei <lihuafei1(a)huawei.com> Suggested-by: Thomas Gleixner <tglx(a)linutronix.de> Signed-off-by: Kan Liang <kan.liang(a)linux.intel.com> Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de> Cc: stable(a)vger.kernel.org Link: https://lore.kernel.org/all/20240819183004.3132920-1-kan.liang@linux.intel.… Closes: https://lore.kernel.org/lkml/20240729223328.327835-1-lihuafei1@huawei.com/ Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Conflicts: arch/x86/events/intel/core.c [ Context conflict due to the backported commit b0560bfd4b70 ("perf/x86/intel: Clean up the hybrid CPU type handling code"). ] Signed-off-by: Li Huafei <lihuafei1(a)huawei.com> --- arch/x86/events/intel/core.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 8b8e9189fd41..e2c1c51d8a01 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -4520,6 +4520,25 @@ static enum hybrid_cpu_type adl_get_hybrid_cpu_type(void) return HYBRID_INTEL_CORE; } +static inline bool erratum_hsw11(struct perf_event *event) +{ + return (event->hw.config & INTEL_ARCH_EVENT_MASK) == + X86_CONFIG(.event=0xc0, .umask=0x01); +} + +/* + * The HSW11 requires a period larger than 100 which is the same as the BDM11. + * A minimum period of 128 is enforced as well for the INST_RETIRED.ALL. + * + * The message 'interrupt took too long' can be observed on any counter which + * was armed with a period < 32 and two events expired in the same NMI. + * A minimum period of 32 is enforced for the rest of the events. + */ +static void hsw_limit_period(struct perf_event *event, s64 *left) +{ + *left = max(*left, erratum_hsw11(event) ? 128 : 32); +} + /* * Broadwell: * @@ -4537,8 +4556,7 @@ static enum hybrid_cpu_type adl_get_hybrid_cpu_type(void) */ static void bdw_limit_period(struct perf_event *event, s64 *left) { - if ((event->hw.config & INTEL_ARCH_EVENT_MASK) == - X86_CONFIG(.event=0xc0, .umask=0x01)) { + if (erratum_hsw11(event)) { if (*left < 128) *left = 128; *left &= ~0x3fULL; @@ -6598,6 +6616,7 @@ __init int intel_pmu_init(void) x86_pmu.hw_config = hsw_hw_config; x86_pmu.get_event_constraints = hsw_get_event_constraints; + x86_pmu.limit_period = hsw_limit_period; x86_pmu.lbr_double_abort = true; extra_attr = boot_cpu_has(X86_FEATURE_RTM) ? hsw_format_attr : nhm_format_attr; -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] perf/x86/intel: Limit the period on Haswell
by Li Huafei 08 Oct '24

08 Oct '24
From: Kan Liang <kan.liang(a)linux.intel.com> mainline inclusion from mainline-v6.11-rc7 commit 25dfc9e357af8aed1ca79b318a73f2c59c1f0b2b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR511 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- Running the ltp test cve-2015-3290 concurrently reports the following warnings. perfevents: irq loop stuck! WARNING: CPU: 31 PID: 32438 at arch/x86/events/intel/core.c:3174 intel_pmu_handle_irq+0x285/0x370 Call Trace: <NMI> ? __warn+0xa4/0x220 ? intel_pmu_handle_irq+0x285/0x370 ? __report_bug+0x123/0x130 ? intel_pmu_handle_irq+0x285/0x370 ? __report_bug+0x123/0x130 ? intel_pmu_handle_irq+0x285/0x370 ? report_bug+0x3e/0xa0 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x50 ? asm_exc_invalid_op+0x1a/0x20 ? irq_work_claim+0x1e/0x40 ? intel_pmu_handle_irq+0x285/0x370 perf_event_nmi_handler+0x3d/0x60 nmi_handle+0x104/0x330 Thanks to Thomas Gleixner's analysis, the issue is caused by the low initial period (1) of the frequency estimation algorithm, which triggers the defects of the HW, specifically erratum HSW11 and HSW143. (For the details, please refer https://lore.kernel.org/lkml/87plq9l5d2.ffs@tglx/) The HSW11 requires a period larger than 100 for the INST_RETIRED.ALL event, but the initial period in the freq mode is 1. The erratum is the same as the BDM11, which has been supported in the kernel. A minimum period of 128 is enforced as well on HSW. HSW143 is regarding that the fixed counter 1 may overcount 32 with the Hyper-Threading is enabled. However, based on the test, the hardware has more issues than it tells. Besides the fixed counter 1, the message 'interrupt took too long' can be observed on any counter which was armed with a period < 32 and two events expired in the same NMI. A minimum period of 32 is enforced for the rest of the events. The recommended workaround code of the HSW143 is not implemented. Because it only addresses the issue for the fixed counter. It brings extra overhead through extra MSR writing. No related overcounting issue has been reported so far. Fixes: 3a632cb229bf ("perf/x86/intel: Add simple Haswell PMU support") Reported-by: Li Huafei <lihuafei1(a)huawei.com> Suggested-by: Thomas Gleixner <tglx(a)linutronix.de> Signed-off-by: Kan Liang <kan.liang(a)linux.intel.com> Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de> Cc: stable(a)vger.kernel.org Link: https://lore.kernel.org/all/20240819183004.3132920-1-kan.liang@linux.intel.… Closes: https://lore.kernel.org/lkml/20240729223328.327835-1-lihuafei1@huawei.com/ Conflicts: arch/x86/events/intel/core.c [ Adapted x86_pmu::limit_period signature due to commit 28f0f3c44b5c (“perf/x86: Change x86_pmu::limit_period signature”) not backported. ] Signed-off-by: Li Huafei <lihuafei1(a)huawei.com> --- arch/x86/events/intel/core.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 4372ed2d1637..1786e8d85b6b 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -4414,6 +4414,25 @@ static u8 adl_get_hybrid_cpu_type(void) return hybrid_big; } +static inline bool erratum_hsw11(struct perf_event *event) +{ + return (event->hw.config & INTEL_ARCH_EVENT_MASK) == + X86_CONFIG(.event=0xc0, .umask=0x01); +} + +/* + * The HSW11 requires a period larger than 100 which is the same as the BDM11. + * A minimum period of 128 is enforced as well for the INST_RETIRED.ALL. + * + * The message 'interrupt took too long' can be observed on any counter which + * was armed with a period < 32 and two events expired in the same NMI. + * A minimum period of 32 is enforced for the rest of the events. + */ +static u64 hsw_limit_period(struct perf_event *event, u64 left) +{ + return max(left, erratum_hsw11(event) ? 128ULL : 32ULL); +} + /* * Broadwell: * @@ -4431,8 +4450,7 @@ static u8 adl_get_hybrid_cpu_type(void) */ static u64 bdw_limit_period(struct perf_event *event, u64 left) { - if ((event->hw.config & INTEL_ARCH_EVENT_MASK) == - X86_CONFIG(.event=0xc0, .umask=0x01)) { + if (erratum_hsw11(event)) { if (left < 128) left = 128; left &= ~0x3fULL; @@ -6406,6 +6424,7 @@ __init int intel_pmu_init(void) x86_pmu.hw_config = hsw_hw_config; x86_pmu.get_event_constraints = hsw_get_event_constraints; + x86_pmu.limit_period = hsw_limit_period; x86_pmu.lbr_double_abort = true; extra_attr = boot_cpu_has(X86_FEATURE_RTM) ? hsw_format_attr : nhm_format_attr; -- 2.25.1
2 1
0 0
[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
  • ← Newer
  • 1
  • ...
  • 557
  • 558
  • 559
  • 560
  • 561
  • 562
  • 563
  • ...
  • 1879
  • Older →

HyperKitty Powered by HyperKitty