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 -----
  • 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

  • 52 participants
  • 18284 discussions
[openeuler:openEuler-1.0-LTS 1365/1365] drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed.
by kernel test robot 23 Mar '25

23 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: abf385ef625e6aeb4923da42fef9ebce788f4ecf commit: b8815fbbe89b0d15fa3296c3e57d2197a92f5bc0 [1365/1365] ACPI: CPPC: Fix cppc_cpufreq_init failed in CPU Hotplug situation config: x86_64-randconfig-102-20250103 (https://download.01.org/0day-ci/archive/20250323/202503231359.qdyINbl7-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) 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/202503231359.qdyINbl7-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed. vim +614 drivers/acpi/cppc_acpi.c 576 577 int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data) 578 { 579 struct cpc_desc **cpc_pptr, *cpc_ptr; 580 int parsed_core_num = 0; 581 int i, ret; 582 583 cpc_pptr = kcalloc(num_possible_cpus(), sizeof(void *), GFP_KERNEL); 584 if (!cpc_pptr) 585 return -ENOMEM; 586 for_each_possible_cpu(i) { 587 cpc_pptr[i] = kzalloc(sizeof(struct cpc_desc), GFP_KERNEL); 588 if (!cpc_pptr[i]) { 589 ret = -ENOMEM; 590 goto out; 591 } 592 } 593 594 /* 595 * We can not use acpi_get_devices() to walk the processor devices 596 * because some processor device is not present. 597 */ 598 ret = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 599 ACPI_UINT32_MAX, acpi_parse_cpc, NULL, 600 cpc_pptr, (void **)&parsed_core_num); 601 if (ret) 602 goto out; 603 if (parsed_core_num != num_possible_cpus()) { 604 ret = -EINVAL; 605 goto out; 606 } 607 608 ret = __acpi_get_psd_map(all_cpu_data, cpc_pptr); 609 610 out: 611 for_each_possible_cpu(i) { 612 cpc_ptr = cpc_pptr[i]; 613 if (cpc_ptr) > 614 kfree(cpc_ptr); 615 } 616 kfree(cpc_pptr); 617 618 return ret; 619 } 620 EXPORT_SYMBOL_GPL(acpi_get_psd_map); 621 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1424/1424] mm/page_alloc.c:1645:3: warning: cast from 'int (*)(unsigned long, unsigned long, struct deferred_args *)' to 'ktask_thread_func' (aka 'int (*)(void *, void *, void *)') converts to incompatible function type
by kernel test robot 23 Mar '25

23 Mar '25
Hi Daniel, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: abf385ef625e6aeb4923da42fef9ebce788f4ecf commit: eb761d6521c32c006a4987260394a61c6684fb35 [1424/1424] mm: parallelize deferred struct page initialization within each node config: x86_64-buildonly-randconfig-003-20250217 (https://download.01.org/0day-ci/archive/20250323/202503231236.qN1C5HOM-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250323/202503231236.qN1C5HOM-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/202503231236.qN1C5HOM-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/page_alloc.c:1412:6: warning: no previous prototype for function 'set_zone_contiguous' [-Wmissing-prototypes] 1412 | void set_zone_contiguous(struct zone *zone) | ^ mm/page_alloc.c:1412:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1412 | void set_zone_contiguous(struct zone *zone) | ^ | static mm/page_alloc.c:1433:6: warning: no previous prototype for function 'clear_zone_contiguous' [-Wmissing-prototypes] 1433 | void clear_zone_contiguous(struct zone *zone) | ^ mm/page_alloc.c:1433:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1433 | void clear_zone_contiguous(struct zone *zone) | ^ | static >> mm/page_alloc.c:1645:3: warning: cast from 'int (*)(unsigned long, unsigned long, struct deferred_args *)' to 'ktask_thread_func' (aka 'int (*)(void *, void *, void *)') converts to incompatible function type [-Wcast-function-type-mismatch] 1645 | DEFINE_KTASK_CTL(ctl, deferred_init_chunk, &args, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1646 | KTASK_PTE_MINCHUNK); | ~~~~~~~~~~~~~~~~~~~ include/linux/ktask.h:139:3: note: expanded from macro 'DEFINE_KTASK_CTL' 139 | KTASK_CTL_INITIALIZER(thread_func, func_arg, min_chunk_size) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ktask.h:123:21: note: expanded from macro 'KTASK_CTL_INITIALIZER' 123 | .kc_thread_func = (ktask_thread_func)(thread_func), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:1661:3: warning: cast from 'int (*)(unsigned long, unsigned long, struct deferred_args *)' to 'ktask_thread_func' (aka 'int (*)(void *, void *, void *)') converts to incompatible function type [-Wcast-function-type-mismatch] 1661 | DEFINE_KTASK_CTL(ctl, deferred_free_chunk, &args, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1662 | KTASK_PTE_MINCHUNK); | ~~~~~~~~~~~~~~~~~~~ include/linux/ktask.h:139:3: note: expanded from macro 'DEFINE_KTASK_CTL' 139 | KTASK_CTL_INITIALIZER(thread_func, func_arg, min_chunk_size) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ktask.h:123:21: note: expanded from macro 'KTASK_CTL_INITIALIZER' 123 | .kc_thread_func = (ktask_thread_func)(thread_func), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 warnings generated. vim +1645 mm/page_alloc.c 1587 1588 /* Initialise remaining memory on a node */ 1589 static int __init deferred_init_memmap(void *data) 1590 { 1591 pg_data_t *pgdat = data; 1592 int nid = pgdat->node_id; 1593 unsigned long start = jiffies; 1594 unsigned long nr_init = 0, nr_free = 0; 1595 unsigned long spfn, epfn, first_init_pfn, flags; 1596 phys_addr_t spa, epa; 1597 int zid; 1598 struct zone *zone; 1599 const struct cpumask *cpumask = cpumask_of_node(pgdat->node_id); 1600 u64 i; 1601 unsigned long nr_node_cpus; 1602 struct ktask_node kn; 1603 1604 /* Bind memory initialisation thread to a local node if possible */ 1605 if (!cpumask_empty(cpumask)) 1606 set_cpus_allowed_ptr(current, cpumask); 1607 1608 pgdat_resize_lock(pgdat, &flags); 1609 first_init_pfn = pgdat->first_deferred_pfn; 1610 if (first_init_pfn == ULONG_MAX) { 1611 pgdat_resize_unlock(pgdat, &flags); 1612 pgdat_init_report_one_done(); 1613 return 0; 1614 } 1615 1616 /* 1617 * We'd like to know the memory bandwidth of the chip to calculate the 1618 * most efficient number of threads to start, but we can't. In 1619 * testing, a good value for a variety of systems was a quarter of the 1620 * CPUs on the node. 1621 */ 1622 nr_node_cpus = DIV_ROUND_UP(cpumask_weight(cpumask), 4); 1623 1624 /* Sanity check boundaries */ 1625 BUG_ON(pgdat->first_deferred_pfn < pgdat->node_start_pfn); 1626 BUG_ON(pgdat->first_deferred_pfn > pgdat_end_pfn(pgdat)); 1627 pgdat->first_deferred_pfn = ULONG_MAX; 1628 1629 /* Only the highest zone is deferred so find it */ 1630 for (zid = 0; zid < MAX_NR_ZONES; zid++) { 1631 zone = pgdat->node_zones + zid; 1632 if (first_init_pfn < zone_end_pfn(zone)) 1633 break; 1634 } 1635 first_init_pfn = max(zone->zone_start_pfn, first_init_pfn); 1636 1637 /* 1638 * Initialize and free pages. We do it in two loops: first we initialize 1639 * struct page, than free to buddy allocator, because while we are 1640 * freeing pages we can access pages that are ahead (computing buddy 1641 * page in __free_one_page()). 1642 */ 1643 for_each_free_mem_range(i, nid, MEMBLOCK_NONE, &spa, &epa, NULL) { 1644 struct deferred_args args = { nid, zid, ATOMIC64_INIT(0) }; > 1645 DEFINE_KTASK_CTL(ctl, deferred_init_chunk, &args, 1646 KTASK_PTE_MINCHUNK); 1647 ktask_ctl_set_max_threads(&ctl, nr_node_cpus); 1648 1649 spfn = max_t(unsigned long, first_init_pfn, PFN_UP(spa)); 1650 epfn = min_t(unsigned long, zone_end_pfn(zone), PFN_DOWN(epa)); 1651 1652 kn.kn_start = (void *)spfn; 1653 kn.kn_task_size = (spfn < epfn) ? epfn - spfn : 0; 1654 kn.kn_nid = nid; 1655 (void) ktask_run_numa(&kn, 1, &ctl); 1656 1657 nr_init += atomic64_read(&args.nr_pages); 1658 } 1659 for_each_free_mem_range(i, nid, MEMBLOCK_NONE, &spa, &epa, NULL) { 1660 struct deferred_args args = { nid, zid, ATOMIC64_INIT(0) }; 1661 DEFINE_KTASK_CTL(ctl, deferred_free_chunk, &args, 1662 KTASK_PTE_MINCHUNK); 1663 ktask_ctl_set_max_threads(&ctl, nr_node_cpus); 1664 1665 spfn = max_t(unsigned long, first_init_pfn, PFN_UP(spa)); 1666 epfn = min_t(unsigned long, zone_end_pfn(zone), PFN_DOWN(epa)); 1667 1668 kn.kn_start = (void *)spfn; 1669 kn.kn_task_size = (spfn < epfn) ? epfn - spfn : 0; 1670 kn.kn_nid = nid; 1671 (void) ktask_run_numa(&kn, 1, &ctl); 1672 1673 nr_free += atomic64_read(&args.nr_pages); 1674 } 1675 pgdat_resize_unlock(pgdat, &flags); 1676 1677 /* Sanity check that the next zone really is unpopulated */ 1678 WARN_ON(++zid < MAX_NR_ZONES && populated_zone(++zone)); 1679 VM_BUG_ON(nr_init != nr_free); 1680 1681 zone->managed_pages += nr_free; 1682 1683 pr_info("node %d initialised, %lu pages in %ums\n", nid, nr_free, 1684 jiffies_to_msecs(jiffies - start)); 1685 1686 pgdat_init_report_one_done(); 1687 return 0; 1688 } 1689 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2051/2051] drivers/irqchip/irq-gic-v3.c:1086:43: warning: passing argument 3 of 'single_open' makes pointer from integer without a cast
by kernel test robot 23 Mar '25

23 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 63f9ef213a477c796c6b343010762513f6315f83 [2051/2051] arm64: Add debugfs dir for xint config: arm64-randconfig-r111-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231209.3Hgyvn46-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250323/202503231209.3Hgyvn46-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/202503231209.3Hgyvn46-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/irqchip/irq-gic-v3.c: In function 'xint_proc_write': drivers/irqchip/irq-gic-v3.c:1042:23: error: implicit declaration of function 'pde_data' [-Werror=implicit-function-declaration] 1042 | int irq = (int)(long)pde_data(file_inode(file)); | ^~~~~~~~ drivers/irqchip/irq-gic-v3.c: In function 'xint_proc_open': >> drivers/irqchip/irq-gic-v3.c:1086:43: warning: passing argument 3 of 'single_open' makes pointer from integer without a cast [-Wint-conversion] 1086 | return single_open(file, xint_proc_show, pde_data(inode)); | ^~~~~~~~~~~~~~~ | | | int In file included from include/linux/debugfs.h:16, from arch/arm64/include/../../../kernel/irq/internals.h:495, from drivers/irqchip/irq-gic-v3.c:39: include/linux/seq_file.h:166:68: note: expected 'void *' but argument is of type 'int' 166 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); | ^~~~~~ drivers/irqchip/irq-gic-v3.c: At top level: drivers/irqchip/irq-gic-v3.c:1089:21: error: variable 'xint_proc_ops' has initializer but incomplete type 1089 | static const struct proc_ops xint_proc_ops = { | ^~~~~~~~ drivers/irqchip/irq-gic-v3.c:1090:3: error: 'const struct proc_ops' has no member named 'proc_open' 1090 | .proc_open = xint_proc_open, | ^~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1090:15: warning: excess elements in struct initializer 1090 | .proc_open = xint_proc_open, | ^~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1090:15: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:1091:3: error: 'const struct proc_ops' has no member named 'proc_read' 1091 | .proc_read = seq_read, | ^~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1091:15: warning: excess elements in struct initializer 1091 | .proc_read = seq_read, | ^~~~~~~~ drivers/irqchip/irq-gic-v3.c:1091:15: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:1092:3: error: 'const struct proc_ops' has no member named 'proc_lseek' 1092 | .proc_lseek = seq_lseek, | ^~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1092:16: warning: excess elements in struct initializer 1092 | .proc_lseek = seq_lseek, | ^~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1092:16: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:1093:3: error: 'const struct proc_ops' has no member named 'proc_release' 1093 | .proc_release = single_release, | ^~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1093:18: warning: excess elements in struct initializer 1093 | .proc_release = single_release, | ^~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1093:18: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:1094:3: error: 'const struct proc_ops' has no member named 'proc_write' 1094 | .proc_write = xint_proc_write, | ^~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1094:16: warning: excess elements in struct initializer 1094 | .proc_write = xint_proc_write, | ^~~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:1094:16: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c: In function 'register_irqchip_proc': drivers/irqchip/irq-gic-v3.c:1103:2: error: implicit declaration of function 'proc_create_data' [-Werror=implicit-function-declaration] 1103 | proc_create_data("xint", 0644, desc->dir, &xint_proc_ops, irqp); | ^~~~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c: In function 'unregister_irqchip_proc': drivers/irqchip/irq-gic-v3.c:1111:2: error: implicit declaration of function 'remove_proc_entry' [-Werror=implicit-function-declaration] 1111 | remove_proc_entry("xint", desc->dir); | ^~~~~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c: At top level: drivers/irqchip/irq-gic-v3.c:1089:30: error: storage size of 'xint_proc_ops' isn't known 1089 | static const struct proc_ops xint_proc_ops = { | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] vim +/single_open +1086 drivers/irqchip/irq-gic-v3.c 3053668e6b2119 Jinjie Ruan 2024-11-25 1038 3053668e6b2119 Jinjie Ruan 2024-11-25 1039 static ssize_t xint_proc_write(struct file *file, 3053668e6b2119 Jinjie Ruan 2024-11-25 1040 const char __user *buffer, size_t count, loff_t *pos) 3053668e6b2119 Jinjie Ruan 2024-11-25 1041 { 3053668e6b2119 Jinjie Ruan 2024-11-25 @1042 int irq = (int)(long)pde_data(file_inode(file)); 3053668e6b2119 Jinjie Ruan 2024-11-25 1043 bool xint_state = false; 3053668e6b2119 Jinjie Ruan 2024-11-25 1044 unsigned long val; 3053668e6b2119 Jinjie Ruan 2024-11-25 1045 char *buf = NULL; 3053668e6b2119 Jinjie Ruan 2024-11-25 1046 3053668e6b2119 Jinjie Ruan 2024-11-25 1047 if (!xint_transform(irq, XINT_RANGE_CHECK)) 3053668e6b2119 Jinjie Ruan 2024-11-25 1048 return -EPERM; 3053668e6b2119 Jinjie Ruan 2024-11-25 1049 3053668e6b2119 Jinjie Ruan 2024-11-25 1050 buf = memdup_user_nul(buffer, count); 3053668e6b2119 Jinjie Ruan 2024-11-25 1051 if (IS_ERR(buf)) 3053668e6b2119 Jinjie Ruan 2024-11-25 1052 return PTR_ERR(buf); 3053668e6b2119 Jinjie Ruan 2024-11-25 1053 3053668e6b2119 Jinjie Ruan 2024-11-25 1054 if (kstrtoul(buf, 0, &val) || (val != 0 && val != 1)) { 3053668e6b2119 Jinjie Ruan 2024-11-25 1055 kfree(buf); 3053668e6b2119 Jinjie Ruan 2024-11-25 1056 return -EINVAL; 3053668e6b2119 Jinjie Ruan 2024-11-25 1057 } 3053668e6b2119 Jinjie Ruan 2024-11-25 1058 3053668e6b2119 Jinjie Ruan 2024-11-25 1059 xint_state = xint_transform(irq, XINT_SET_CHECK); 3053668e6b2119 Jinjie Ruan 2024-11-25 1060 if (xint_state == val) { 3053668e6b2119 Jinjie Ruan 2024-11-25 1061 kfree(buf); 3053668e6b2119 Jinjie Ruan 2024-11-25 1062 return -EBUSY; 3053668e6b2119 Jinjie Ruan 2024-11-25 1063 } 3053668e6b2119 Jinjie Ruan 2024-11-25 1064 3053668e6b2119 Jinjie Ruan 2024-11-25 1065 local_irq_disable(); 3053668e6b2119 Jinjie Ruan 2024-11-25 1066 disable_irq(irq); 3053668e6b2119 Jinjie Ruan 2024-11-25 1067 3053668e6b2119 Jinjie Ruan 2024-11-25 1068 xint_transform(irq, xint_state ? XINT_TO_IRQ : IRQ_TO_XINT); 3053668e6b2119 Jinjie Ruan 2024-11-25 1069 3053668e6b2119 Jinjie Ruan 2024-11-25 1070 enable_irq(irq); 3053668e6b2119 Jinjie Ruan 2024-11-25 1071 local_irq_enable(); 3053668e6b2119 Jinjie Ruan 2024-11-25 1072 3053668e6b2119 Jinjie Ruan 2024-11-25 1073 kfree(buf); 3053668e6b2119 Jinjie Ruan 2024-11-25 1074 3053668e6b2119 Jinjie Ruan 2024-11-25 1075 return count; 3053668e6b2119 Jinjie Ruan 2024-11-25 1076 } 3053668e6b2119 Jinjie Ruan 2024-11-25 1077 3053668e6b2119 Jinjie Ruan 2024-11-25 1078 static int xint_proc_show(struct seq_file *m, void *v) 3053668e6b2119 Jinjie Ruan 2024-11-25 1079 { 3053668e6b2119 Jinjie Ruan 2024-11-25 1080 seq_printf(m, "%d\n", xint_transform((long)m->private, XINT_SET_CHECK)); 3053668e6b2119 Jinjie Ruan 2024-11-25 1081 return 0; 3053668e6b2119 Jinjie Ruan 2024-11-25 1082 } 3053668e6b2119 Jinjie Ruan 2024-11-25 1083 3053668e6b2119 Jinjie Ruan 2024-11-25 1084 static int xint_proc_open(struct inode *inode, struct file *file) 3053668e6b2119 Jinjie Ruan 2024-11-25 1085 { 3053668e6b2119 Jinjie Ruan 2024-11-25 @1086 return single_open(file, xint_proc_show, pde_data(inode)); 3053668e6b2119 Jinjie Ruan 2024-11-25 1087 } 3053668e6b2119 Jinjie Ruan 2024-11-25 1088 :::::: The code at line 1086 was first introduced by commit :::::: 3053668e6b211924bb67c19d791a5a532eca2ad8 arm64: Introduce Xint software solution :::::: TO: Jinjie Ruan <ruanjinjie(a)huawei.com> :::::: CC: Jinjie Ruan <ruanjinjie(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2051/2051] drivers/platform/mpam/mpam_devices.c:247:11: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
by kernel test robot 23 Mar '25

23 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 3e9e723f3bf92a19e5e15dda89bbb136ce463294 [2051/2051] arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate config: arm64-randconfig-r064-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231208.7HZ1I0ac-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250323/202503231208.7HZ1I0ac-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/202503231208.7HZ1I0ac-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/slab.h:16, from include/linux/resource_ext.h:11, from include/linux/acpi.h:13, from drivers/platform/mpam/mpam_devices.c:6: drivers/platform/mpam/mpam_devices.c: In function 'mpam_msc_drv_probe': drivers/platform/mpam/mpam_devices.c:212:24: error: 'struct mpam_msc' has no member named 'mon_sel_lock'; did you mean 'part_sel_lock'? 212 | spin_lock_init(&msc->mon_sel_lock); | ^~~~~~~~~~~~ include/linux/spinlock.h:335:38: note: in definition of macro 'spin_lock_init' 335 | __raw_spin_lock_init(spinlock_check(lock), \ | ^~~~ drivers/platform/mpam/mpam_devices.c:247:11: error: implicit declaration of function '__acpi_get_mem_attribute' [-Werror=implicit-function-declaration] 247 | prot = __acpi_get_mem_attribute(msc->pcc_chan->shmem_base_addr); | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/platform/mpam/mpam_devices.c:247:11: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int' cc1: some warnings being treated as errors vim +247 drivers/platform/mpam/mpam_devices.c 170 171 static int mpam_msc_drv_probe(struct platform_device *pdev) 172 { 173 int err; 174 pgprot_t prot; 175 void * __iomem io; 176 struct mpam_msc *msc; 177 struct resource *msc_res; 178 void *plat_data = pdev->dev.platform_data; 179 180 mutex_lock(&mpam_list_lock); 181 do { 182 msc = devm_kzalloc(&pdev->dev, sizeof(*msc), GFP_KERNEL); 183 if (!msc) { 184 err = -ENOMEM; 185 break; 186 } 187 188 INIT_LIST_HEAD_RCU(&msc->glbl_list); 189 msc->pdev = pdev; 190 191 err = device_property_read_u32(&pdev->dev, "arm,not-ready-us", 192 &msc->nrdy_usec); 193 if (err) { 194 /* This will prevent CSU monitors being usable */ 195 msc->nrdy_usec = 0; 196 } 197 198 err = get_msc_affinity(msc); 199 if (err) 200 break; 201 if (cpumask_empty(&msc->accessibility)) { 202 pr_err_once("msc:%u is not accessible from any CPU!", 203 msc->id); 204 err = -EINVAL; 205 break; 206 } 207 208 mutex_init(&msc->lock); 209 msc->id = mpam_num_msc++; 210 INIT_LIST_HEAD_RCU(&msc->ris); 211 spin_lock_init(&msc->part_sel_lock); 212 spin_lock_init(&msc->mon_sel_lock); 213 214 if (device_property_read_u32(&pdev->dev, "pcc-channel", 215 &msc->pcc_subspace_id)) 216 msc->iface = MPAM_IFACE_MMIO; 217 else 218 msc->iface = MPAM_IFACE_PCC; 219 220 if (msc->iface == MPAM_IFACE_MMIO) { 221 io = devm_platform_get_and_ioremap_resource(pdev, 0, 222 &msc_res); 223 if (IS_ERR(io)) { 224 pr_err("Failed to map MSC base address\n"); 225 devm_kfree(&pdev->dev, msc); 226 err = PTR_ERR(io); 227 break; 228 } 229 msc->mapped_hwpage_sz = msc_res->end - msc_res->start; 230 msc->mapped_hwpage = io; 231 } else if (msc->iface == MPAM_IFACE_PCC) { 232 msc->pcc_cl.dev = &pdev->dev; 233 msc->pcc_cl.rx_callback = mpam_pcc_rx_callback; 234 msc->pcc_cl.tx_block = false; 235 msc->pcc_cl.tx_tout = 1000; /* 1s */ 236 msc->pcc_cl.knows_txdone = false; 237 238 msc->pcc_chan = pcc_mbox_request_channel(&msc->pcc_cl, 239 msc->pcc_subspace_id); 240 if (IS_ERR(msc->pcc_chan)) { 241 pr_err("Failed to request MSC PCC channel\n"); 242 devm_kfree(&pdev->dev, msc); 243 err = PTR_ERR(msc->pcc_chan); 244 break; 245 } 246 > 247 prot = __acpi_get_mem_attribute(msc->pcc_chan->shmem_base_addr); 248 io = ioremap_prot(msc->pcc_chan->shmem_base_addr, 249 msc->pcc_chan->shmem_size, pgprot_val(prot)); 250 if (IS_ERR(io)) { 251 pr_err("Failed to map MSC base address\n"); 252 pcc_mbox_free_channel(msc->pcc_chan); 253 devm_kfree(&pdev->dev, msc); 254 err = PTR_ERR(io); 255 break; 256 } 257 258 /* TODO: issue a read to update the registers */ 259 260 msc->mapped_hwpage_sz = msc->pcc_chan->shmem_size; 261 msc->mapped_hwpage = io + sizeof(struct acpi_pcct_shared_memory); 262 } 263 264 list_add_rcu(&msc->glbl_list, &mpam_all_msc); 265 platform_set_drvdata(pdev, msc); 266 } while (0); 267 mutex_unlock(&mpam_list_lock); 268 269 if (!err) { 270 /* Create RIS entries described by firmware */ 271 if (!acpi_disabled) 272 err = acpi_mpam_parse_resources(msc, plat_data); 273 else 274 err = mpam_dt_parse_resources(msc, plat_data); 275 } 276 277 if (!err && fw_num_msc == mpam_num_msc) 278 mpam_discovery_complete(); 279 280 return err; 281 } 282 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2051/2051] include/linux/if_caqm.h:391:23: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot 23 Mar '25

23 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 946747d4a52c34156031e41f9cb5cfb292747dcf [2051/2051] net: tcp: Add CAQM4TCP in the openeuler 6.6 kernel config: arm64-randconfig-r111-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231154.d6j01UpO-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250323/202503231154.d6j01UpO-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/202503231154.d6j01UpO-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) net/core/gro.c: note: in included file: >> include/linux/if_caqm.h:391:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] caqm_hdr_info @@ got restricted __be16 [usertype] h_caqm_info @@ include/linux/if_caqm.h:391:23: sparse: expected unsigned short [usertype] caqm_hdr_info include/linux/if_caqm.h:391:23: sparse: got restricted __be16 [usertype] h_caqm_info -- net/ethernet/eth.c: note: in included file: >> include/linux/if_caqm.h:470:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __be16 [usertype] @@ include/linux/if_caqm.h:470:25: sparse: expected unsigned short [usertype] include/linux/if_caqm.h:470:25: sparse: got restricted __be16 [usertype] vim +391 include/linux/if_caqm.h 359 360 static inline void skb_gro_caqm_untag(struct sk_buff *skb) 361 { 362 #ifdef CONFIG_ETH_CAQM 363 struct caqm_hdr *chdr; 364 struct vlan_hdr *vlanhdr; 365 u16 caqm_hdr_info; 366 __be16 proto = skb->protocol; 367 u8 skip_time = 0; 368 int mac_len, meta_len; 369 void *meta; 370 struct caqm_hdr tmp_caqm_data; 371 372 if (!static_branch_unlikely(&sysctl_caqm_enable) || skb_shared(skb)) 373 return; 374 375 /* We may access the two bytes after caqm_hdr in caqm_set_encap_proto(). */ 376 if (unlikely(!pskb_may_pull(skb, VLAN_HLEN * 2 + CAQM_HLEN + sizeof(unsigned short)))) 377 return; 378 379 vlanhdr = (struct vlan_hdr *)(skb->data - VLAN_HLEN); 380 // Skip at most 2 vlan hdr 381 while (skip_time < 2 && eth_type_vlan(proto)) { 382 vlanhdr++; // chdr move a VLAN len 383 skip_time += 1; 384 proto = vlanhdr->h_vlan_encapsulated_proto; 385 } 386 // Look for vlan header, 2 times 387 if (!eth_type_caqm(proto) || skb_cow(skb, skb_headroom(skb)) < 0) 388 return; 389 390 chdr = (struct caqm_hdr *)(((void *)vlanhdr) + VLAN_HLEN); > 391 caqm_hdr_info = chdr->h_caqm_info; 392 __caqm_put_tag(skb, caqm_hdr_info); 393 394 if ((unsigned char *) chdr != skb->data) { 395 // adjust the caqm header before vlan header 396 // 1. Set the vlanhdr->proto as the next 397 vlanhdr->h_vlan_encapsulated_proto = chdr->h_caqm_encapsulated_proto; 398 // 2. Exchange caqm and vlan hdr 399 tmp_caqm_data = *chdr; 400 memmove(skb->data + CAQM_HLEN, skb->data, skip_time * VLAN_HLEN); 401 *(struct caqm_hdr *)(skb->data) = tmp_caqm_data; 402 } else 403 caqm_set_encap_proto(skb, chdr); 404 405 skb_pull_rcsum(skb, CAQM_HLEN); 406 407 mac_len = skb->data - skb_mac_header(skb); 408 if (likely(mac_len > CAQM_HLEN + ETH_TLEN)) { 409 memmove(skb_mac_header(skb) + CAQM_HLEN, skb_mac_header(skb), 410 mac_len - CAQM_HLEN - ETH_TLEN); 411 } 412 413 meta_len = skb_metadata_len(skb); 414 if (meta_len) { 415 meta = skb_metadata_end(skb) - meta_len; 416 memmove(meta + CAQM_HLEN, meta, meta_len); 417 } 418 419 skb->mac_header += CAQM_HLEN; 420 421 skb_reset_network_header(skb); 422 if (!skb_transport_header_was_set(skb)) 423 skb_reset_transport_header(skb); 424 skb_reset_mac_len(skb); 425 426 #endif 427 } 428 429 #ifdef CONFIG_ETH_CAQM 430 static inline __be16 caqm_get_protocol_and_depth(struct sk_buff *skb, 431 __be16 type, int *depth) 432 { 433 type = vlan_get_protocol_and_depth(skb, type, depth); 434 if (static_branch_unlikely(&sysctl_caqm_enable) && eth_type_caqm(type)) 435 return caqm_get_protocol_and_depth_after_vlan(skb, type, depth); 436 else 437 return type; 438 } 439 #endif 440 441 static inline void caqm_update_hint_in_gro(struct sk_buff *skb, struct sk_buff *p) 442 { 443 #ifdef CONFIG_ETH_CAQM 444 struct skb_caqm_info *cinfo_p = get_skb_caqm_info(p); 445 struct skb_caqm_info *cinfo_skb = get_skb_caqm_info(skb); 446 447 if (static_branch_unlikely(&sysctl_caqm_enable) && cinfo_p->recv_en && cinfo_skb->recv_en) { 448 cinfo_p->recv_hint += cinfo_skb->recv_hint; 449 cinfo_skb->recv_en = 0; 450 } 451 #endif 452 } 453 454 static inline int caqm_add_eth_header(struct sk_buff *skb, unsigned short *type, 455 struct net_device *dev) 456 { 457 #ifdef CONFIG_ETH_CAQM 458 struct skb_caqm_info *cinfo = get_skb_caqm_info(skb); 459 460 if (static_branch_unlikely(&sysctl_caqm_enable) && 461 (sysctl_caqm_filter_nics & (1UL << dev->ifindex)) == 0) 462 cinfo->send_en = 0; 463 if (static_branch_unlikely(&sysctl_caqm_enable) && cinfo->send_en) { 464 cinfo->send_en = 0; 465 if (unlikely(skb_headroom(skb) < ETH_HLEN + CAQM_HLEN)) 466 return -ETH_HLEN; 467 u16 *chdr = skb_push(skb, CAQM_HLEN); 468 469 chdr[0] = (cinfo->send_hdr); > 470 chdr[1] = htons(*type); 471 *type = (unsigned short)sysctl_caqm_tpid; 472 } 473 #endif 474 return 0; 475 } 476 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2051/2051] mm/memblock.c:1409:20: sparse: sparse: symbol 'memblock_alloc_range_nid_flags' was not declared. Should it be static?
by kernel test robot 23 Mar '25

23 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 64018b291c1f49622c4b23b303364d760306d662 [2051/2051] mm/memblock: Introduce ability to alloc memory from specify memory region config: loongarch-randconfig-r131-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231106.ZSS1yt6E-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20250323/202503231106.ZSS1yt6E-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/202503231106.ZSS1yt6E-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> mm/memblock.c:1409:20: sparse: sparse: symbol 'memblock_alloc_range_nid_flags' was not declared. Should it be static? vim +/memblock_alloc_range_nid_flags +1409 mm/memblock.c 1386 1387 /** 1388 * memblock_alloc_range_nid_flags - allocate boot memory block with specify flag 1389 * @size: size of memory block to be allocated in bytes 1390 * @align: alignment of the region and block's size 1391 * @start: the lower bound of the memory region to allocate (phys address) 1392 * @end: the upper bound of the memory region to allocate (phys address) 1393 * @nid: nid of the free area to find, %NUMA_NO_NODE for any node 1394 * @exact_nid: control the allocation fall back to other nodes 1395 * @flags: alloc memory from specify memblock flag 1396 * 1397 * The allocation is performed from memory region limited by 1398 * memblock.current_limit if @end == %MEMBLOCK_ALLOC_ACCESSIBLE. 1399 * 1400 * If the specified node can not hold the requested memory and @exact_nid 1401 * is false, the allocation falls back to any node in the system. 1402 * 1403 * In addition, function sets the min_count to 0 using kmemleak_alloc_phys for 1404 * allocated boot memory block, so that it is never reported as leaks. 1405 * 1406 * Return: 1407 * Physical address of allocated memory block on success, %0 on failure. 1408 */ > 1409 phys_addr_t __init memblock_alloc_range_nid_flags(phys_addr_t size, 1410 phys_addr_t align, phys_addr_t start, 1411 phys_addr_t end, int nid, 1412 bool exact_nid, 1413 enum memblock_flags flags) 1414 { 1415 phys_addr_t found; 1416 1417 if (WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n")) 1418 nid = NUMA_NO_NODE; 1419 1420 if (!align) { 1421 /* Can't use WARNs this early in boot on powerpc */ 1422 dump_stack(); 1423 align = SMP_CACHE_BYTES; 1424 } 1425 1426 again: 1427 found = memblock_find_in_range_node(size, align, start, end, nid, 1428 flags); 1429 if (found && !memblock_reserve(found, size)) 1430 goto done; 1431 1432 if (nid != NUMA_NO_NODE && !exact_nid) { 1433 found = memblock_find_in_range_node(size, align, start, 1434 end, NUMA_NO_NODE, 1435 flags); 1436 if (found && !memblock_reserve(found, size)) 1437 goto done; 1438 } 1439 1440 if (flags & MEMBLOCK_MIRROR) { 1441 flags &= ~MEMBLOCK_MIRROR; 1442 pr_warn_ratelimited("Could not allocate %pap bytes of mirrored memory\n", 1443 &size); 1444 goto again; 1445 } 1446 1447 return 0; 1448 1449 done: 1450 /* 1451 * Skip kmemleak for those places like kasan_init() and 1452 * early_pgtable_alloc() due to high volume. 1453 */ 1454 if (end != MEMBLOCK_ALLOC_NOLEAKTRACE) 1455 /* 1456 * Memblock allocated blocks are never reported as 1457 * leaks. This is because many of these blocks are 1458 * only referred via the physical address which is 1459 * not looked up by kmemleak. 1460 */ 1461 kmemleak_alloc_phys(found, size, 0); 1462 1463 /* 1464 * Some Virtual Machine platforms, such as Intel TDX or AMD SEV-SNP, 1465 * require memory to be accepted before it can be used by the 1466 * guest. 1467 * 1468 * Accept the memory of the allocated buffer. 1469 */ 1470 accept_memory(found, found + size); 1471 1472 return found; 1473 } 1474 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2051/2051] kernel/sched/core.c:11516:4: warning: format specifies type 'unsigned long long' but the argument has type 'int'
by kernel test robot 23 Mar '25

23 Mar '25
Hi Hui, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 6eb07f9925a906d81f328c808ba25f7800888dce [2051/2051] sched: Introduce smart grid scheduling strategy for cfs config: arm64-randconfig-r061-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231038.JR2kOoEd-lkp@…) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250323/202503231038.JR2kOoEd-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/202503231038.JR2kOoEd-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/sched/core.c:11374:5: warning: no previous prototype for function 'tg_set_dynamic_affinity_mode' [-Wmissing-prototypes] int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode) ^ kernel/sched/core.c:11374:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode) ^ static kernel/sched/core.c:11415:5: warning: no previous prototype for function 'tg_set_affinity_period' [-Wmissing-prototypes] int tg_set_affinity_period(struct task_group *tg, u64 period_ms) ^ kernel/sched/core.c:11415:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tg_set_affinity_period(struct task_group *tg, u64 period_ms) ^ static kernel/sched/core.c:11429:5: warning: no previous prototype for function 'tg_get_affinity_period' [-Wmissing-prototypes] u64 tg_get_affinity_period(struct task_group *tg) ^ kernel/sched/core.c:11429:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u64 tg_get_affinity_period(struct task_group *tg) ^ static >> kernel/sched/core.c:11516:4: warning: format specifies type 'unsigned long long' but the argument has type 'int' [-Wformat] schedstat_val(ad->stay_cnt[i])); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/stats.h:100:32: note: expanded from macro 'schedstat_val' # define schedstat_val(var) 0 ^ 4 warnings generated. vim +11516 kernel/sched/core.c 11493 11494 static int cpu_affinity_stat_show(struct seq_file *sf, void *v) 11495 { 11496 struct task_group *tg = css_tg(seq_css(sf)); 11497 struct auto_affinity *auto_affi = tg->auto_affinity; 11498 struct affinity_domain *ad; 11499 int i; 11500 11501 /* No stat when dynamic affinity disabled */ 11502 if (!dynamic_affinity_enabled()) 11503 return -EPERM; 11504 11505 if (unlikely(!auto_affi)) 11506 return -EPERM; 11507 11508 ad = &auto_affi->ad; 11509 seq_printf(sf, "period_active %d\n", auto_affi->period_active); 11510 seq_printf(sf, "dcount %d\n", ad->dcount); 11511 seq_printf(sf, "domain_mask 0x%x\n", ad->domain_mask); 11512 seq_printf(sf, "curr_level %d\n", ad->curr_level); 11513 for (i = 0; i < ad->dcount; i++) 11514 seq_printf(sf, "sd_level %d, cpu list %*pbl, stay_cnt %llu\n", 11515 i, cpumask_pr_args(ad->domains[i]), 11516 schedstat_val(ad->stay_cnt[i])); 11517 11518 return 0; 11519 } 11520 #endif /* CONFIG_QOS_SCHED_SMART_GRID */ 11521 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2051/2051] drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot 23 Mar '25

23 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 9c1c9598010fbb9daa1e2a67d23830092fb6246a [2051/2051] net/hinic: Update Huawei Intelligent Network Card Driver: hinic config: arm64-randconfig-r111-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231008.CBNqLNFq-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250323/202503231008.CBNqLNFq-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/202503231008.CBNqLNFq-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/net/ethernet/huawei/hinic/hinic_hwif.c:40:16: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:40:16: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:40:16: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:40:16: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:40:16: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:40:16: sparse: sparse: cast to restricted __be32 >> drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: expected unsigned int [usertype] value drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: got restricted __be32 [usertype] drivers/net/ethernet/huawei/hinic/hinic_hwif.c:592:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] [usertype] __iomem *cfg_regs_base @@ got void *cfg_reg_base @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:592:29: sparse: expected unsigned char [noderef] [usertype] __iomem *cfg_regs_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:592:29: sparse: got void *cfg_reg_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:593:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] [usertype] __iomem *intr_regs_base @@ got void *intr_reg_base @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:593:30: sparse: expected unsigned char [noderef] [usertype] __iomem *intr_regs_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:593:30: sparse: got void *intr_reg_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:596:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] [usertype] __iomem *db_base @@ got void *db_base @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:596:23: sparse: expected unsigned char [noderef] [usertype] __iomem *db_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:596:23: sparse: got void *db_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:597:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *dwqe_mapping @@ got void *dwqe_mapping @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:597:28: sparse: expected void [noderef] __iomem *dwqe_mapping drivers/net/ethernet/huawei/hinic/hinic_hwif.c:597:28: sparse: got void *dwqe_mapping >> drivers/net/ethernet/huawei/hinic/hinic_hwif.c:664:64: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted gfp_t [usertype] gfp @@ got unsigned int flag @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:664:64: sparse: expected restricted gfp_t [usertype] gfp drivers/net/ethernet/huawei/hinic/hinic_hwif.c:664:64: sparse: got unsigned int flag drivers/net/ethernet/huawei/hinic/hinic_hwif.c:679:64: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted gfp_t [usertype] gfp @@ got unsigned int flag @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:679:64: sparse: expected restricted gfp_t [usertype] gfp drivers/net/ethernet/huawei/hinic/hinic_hwif.c:679:64: sparse: got unsigned int flag drivers/net/ethernet/huawei/hinic/hinic_hwif.c:984:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:984:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:984:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:984:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:984:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:984:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:993:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:993:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:993:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:993:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:993:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:993:17: sparse: sparse: cast to restricted __be32 vim +46 drivers/net/ethernet/huawei/hinic/hinic_hwif.c 36 37 /* For UEFI driver, this function can only read BAR0 */ 38 u32 hinic_hwif_read_reg(struct hinic_hwif *hwif, u32 reg) 39 { > 40 return be32_to_cpu(readl(hwif->cfg_regs_base + reg)); 41 } 42 43 /* For UEFI driver, this function can only write BAR0 */ 44 void hinic_hwif_write_reg(struct hinic_hwif *hwif, u32 reg, u32 val) 45 { > 46 writel(cpu_to_be32(val), hwif->cfg_regs_base + reg); 47 } 48 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2051/2051] include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer
by kernel test robot 23 Mar '25

23 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 0214feb8f616acf62f9a6a2a131f0a1479b2b8af [2051/2051] mm/userswap: introduce UFFDIO_COPY_MODE_DIRECT_MAP config: loongarch-randconfig-r131-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231043.bCX9sPgT-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20250323/202503231043.bCX9sPgT-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/202503231043.bCX9sPgT-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) mm/userfaultfd.c:136:9: sparse: sparse: context imbalance in 'mfill_atomic_install_pte' - unexpected unlock mm/userfaultfd.c:243:9: sparse: sparse: context imbalance in 'mfill_atomic_pte_zeropage' - unexpected unlock mm/userfaultfd.c:325:9: sparse: sparse: context imbalance in 'mfill_atomic_pte_poison' - unexpected unlock mm/userfaultfd.c: note: in included file: >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode vim +66 include/linux/userfaultfd_k.h 63 64 static inline uffd_flags_t uffd_flags_set_mode(uffd_flags_t flags, enum mfill_atomic_mode mode) 65 { > 66 if (IS_ENABLED(CONFIG_USERSWAP) && (flags & MFILL_ATOMIC_DIRECT_MAP) && > 67 uffd_flags_mode_is(mode, MFILL_ATOMIC_COPY)) 68 mode = MFILL_ATOMIC_DIRECT_MAP; 69 70 flags &= ~MFILL_ATOMIC_MODE_MASK; 71 return flags | ((__force uffd_flags_t) mode); 72 } 73 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1512/1512] kernel/sched/grid/qos.c:84:31: error: 'struct mempolicy' has no member named 'v'
by kernel test robot 23 Mar '25

23 Mar '25
Hi Wang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: abf385ef625e6aeb4923da42fef9ebce788f4ecf commit: ce35ded5d5774f055f6850b15032066ff4936414 [1512/1512] sched: smart grid: init sched_grid_qos structure on QOS purpose config: arm64-randconfig-r061-20250323 (https://download.01.org/0day-ci/archive/20250323/202503230934.Ug2Wd8BQ-lkp@…) compiler: aarch64-linux-gcc (GCC) 11.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250323/202503230934.Ug2Wd8BQ-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/202503230934.Ug2Wd8BQ-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from kernel/sched/grid/qos.c:19: kernel/sched/grid/qos.c: In function 'sched_grid_preferred_interleave_nid': >> kernel/sched/grid/qos.c:84:31: error: 'struct mempolicy' has no member named 'v' 84 | if (nodes_equal(policy->v.nodes, *preferred_nmask)) | ^~ include/linux/nodemask.h:202:41: note: in definition of macro 'nodes_equal' 202 | __nodes_equal(&(src1), &(src2), MAX_NUMNODES) | ^~~~ kernel/sched/grid/qos.c:91:32: error: 'struct mempolicy' has no member named 'v' 91 | nodes_and(nmask, policy->v.nodes, *preferred_nmask); | ^~ include/linux/nodemask.h:162:47: note: in definition of macro 'nodes_and' 162 | __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES) | ^~~~ >> kernel/sched/grid/qos.c:95:31: error: 'struct task_struct' has no member named 'il_prev' 95 | next = next_node_in(me->il_prev, nmask); | ^~ include/linux/nodemask.h:278:46: note: in definition of macro 'next_node_in' 278 | #define next_node_in(n, src) __next_node_in((n), &(src)) | ^ kernel/sched/grid/qos.c:97:19: error: 'struct task_struct' has no member named 'il_prev' 97 | me->il_prev = next; | ^~ In file included from kernel/sched/grid/qos.c:20: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ vim +84 kernel/sched/grid/qos.c > 19 #include <linux/nodemask.h> 20 #include <linux/mempolicy.h> 21 #include <linux/slab.h> 22 #include <linux/sched.h> 23 #include <linux/sched/grid_qos.h> 24 #include "internal.h" 25 26 static int qos_affinity_set(struct task_struct *p) 27 { 28 int n; 29 struct sched_grid_qos_affinity *affinity = &p->grid_qos->affinity; 30 31 nodes_clear(affinity->mem_preferred_node_mask); 32 /* 33 * We want the memory allocation to be as close to the CPU 34 * as possible, and adjust after getting memory bandwidth usage. 35 */ 36 for (n = 0; n < nr_node_ids; n++) 37 if (cpumask_intersects(cpumask_of_node(n), p->prefer_cpus)) 38 node_set(n, affinity->mem_preferred_node_mask); 39 40 return 0; 41 } 42 43 int sched_grid_qos_fork(struct task_struct *p, struct task_struct *orig) 44 { 45 struct sched_grid_qos *qos; 46 47 qos = kzalloc(sizeof(*qos), GFP_KERNEL); 48 if (!qos) 49 return -ENOMEM; 50 51 qos_power_init(&qos->power); 52 qos_stat_init(&qos->stat); 53 54 nodes_clear(qos->affinity.mem_preferred_node_mask); 55 if (likely(orig->grid_qos)) 56 qos->affinity = orig->grid_qos->affinity; 57 qos->affinity_set = qos_affinity_set; 58 p->grid_qos = qos; 59 60 return 0; 61 } 62 63 void sched_grid_qos_free(struct task_struct *p) 64 { 65 kfree(p->grid_qos); 66 p->grid_qos = NULL; 67 } 68 69 /* dynamic select a more appropriate preferred interleave nid for process */ 70 int sched_grid_preferred_interleave_nid(struct mempolicy *policy) 71 { 72 nodemask_t nmask; 73 unsigned int next; 74 struct task_struct *me = current; 75 nodemask_t *preferred_nmask = NULL; 76 77 if (likely(me->grid_qos)) 78 preferred_nmask = 79 &me->grid_qos->affinity.mem_preferred_node_mask; 80 81 if (!preferred_nmask || !policy) 82 return NUMA_NO_NODE; 83 > 84 if (nodes_equal(policy->v.nodes, *preferred_nmask)) 85 return NUMA_NO_NODE; 86 /* 87 * We perceive the actual consumption of memory bandwidth 88 * in each node and post a preferred interleave nid in 89 * more appropriate range. 90 */ > 91 nodes_and(nmask, policy->v.nodes, *preferred_nmask); 92 if (nodes_empty(nmask)) 93 return NUMA_NO_NODE; 94 > 95 next = next_node_in(me->il_prev, nmask); 96 if (next < MAX_NUMNODES) 97 me->il_prev = next; 98 return next; 99 } 100 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • ...
  • 1829
  • Older →

HyperKitty Powered by HyperKitty