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
  • 18283 discussions
[PATCH openEuler-1.0-LTS] nilfs2: fix null-ptr-deref in block_touch_buffer tracepoint
by He Yujie 16 Dec '24

16 Dec '24
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> stable inclusion from stable-v4.19.325 commit 085556bf8c70e2629e02e79268dac3016a08b8bf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB956P CVE: CVE-2024-53131 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit cd45e963e44b0f10d90b9e6c0e8b4f47f3c92471 upstream. Patch series "nilfs2: fix null-ptr-deref bugs on block tracepoints". This series fixes null pointer dereference bugs that occur when using nilfs2 and two block-related tracepoints. This patch (of 2): It has been reported that when using "block:block_touch_buffer" tracepoint, touch_buffer() called from __nilfs_get_folio_block() causes a NULL pointer dereference, or a general protection fault when KASAN is enabled. This happens because since the tracepoint was added in touch_buffer(), it references the dev_t member bh->b_bdev->bd_dev regardless of whether the buffer head has a pointer to a block_device structure. In the current implementation, the block_device structure is set after the function returns to the caller. Here, touch_buffer() is used to mark the folio/page that owns the buffer head as accessed, but the common search helper for folio/page used by the caller function was optimized to mark the folio/page as accessed when it was reimplemented a long time ago, eliminating the need to call touch_buffer() here in the first place. So this solves the issue by eliminating the touch_buffer() call itself. Link: https://lkml.kernel.org/r/20241106160811.3316-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20241106160811.3316-2-konishi.ryusuke@gmail.com Fixes: 5305cb830834 ("block: add block_{touch|dirty}_buffer tracepoint") Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> Reported-by: Ubisectech Sirius <bugreport(a)valiantsec.com> Closes: https://lkml.kernel.org/r/86bd3013-887e-4e38-960f-ca45c657f032.bugreport@va… Reported-by: syzbot+9982fb8d18eba905abe2(a)syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=9982fb8d18eba905abe2 Tested-by: syzbot+9982fb8d18eba905abe2(a)syzkaller.appspotmail.com Cc: Tejun Heo <tj(a)kernel.org> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- fs/nilfs2/page.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 360808b39b6d..cc3308d1c61d 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c @@ -39,7 +39,6 @@ __nilfs_get_page_block(struct page *page, unsigned long block, pgoff_t index, first_block = (unsigned long)index << (PAGE_SHIFT - blkbits); bh = nilfs_page_get_nth_block(page, block - first_block); - touch_buffer(bh); wait_on_buffer(bh); return bh; } -- 2.34.1
2 1
0 0
[openeuler:OLK-5.10 2566/2566] drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used
by kernel test robot 15 Dec '24

15 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6c3413fbf8c430b89f5d23f465e10e99ea145199 commit: e53494b741272933726616122ea77143d9742631 [2566/2566] drivers: initial support for rnp drivers from Mucse Technology config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241215/202412151215.kRAdh5LL-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/20241215/202412151215.kRAdh5LL-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/202412151215.kRAdh5LL-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:7: In file included from include/linux/pci.h:1499: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:1579: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:34: In file included from drivers/net/ethernet/mucse/rnp/rnp_tc_u32_parse.h:6: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:174:6: warning: no previous prototype for function 'rnp_unmap_and_free_tx_resource' [-Wmissing-prototypes] 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:174:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:669:5: warning: no previous prototype for function 'rnp_rx_ring_reinit' [-Wmissing-prototypes] 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:669:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:1777:7: warning: variable 'xdp_xmit' set but not used [-Wunused-but-set-variable] 1777 | bool xdp_xmit = false; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:6: warning: no previous prototype for function 'rnp_write_eitr_rx' [-Wmissing-prototypes] 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2818:6: warning: variable 'rxctrl' set but not used [-Wunused-but-set-variable] 2818 | u32 rxctrl = 0, dma_axi_ctl; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:6: warning: no previous prototype for function 'rnp_vlan_stags_flag' [-Wmissing-prototypes] 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:5: warning: no previous prototype for function 'rnp_xmit_nop_frame_ring' [-Wmissing-prototypes] 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:6: warning: no previous prototype for function 'rnp_service_timer' [-Wmissing-prototypes] 4811 | void rnp_service_timer(struct timer_list *t) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4811 | void rnp_service_timer(struct timer_list *t) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:6: warning: no previous prototype for function 'rnp_service_task' [-Wmissing-prototypes] 4919 | void rnp_service_task(struct work_struct *work) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4919 | void rnp_service_task(struct work_struct *work) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:5: warning: no previous prototype for function 'rnp_delete_knode' [-Wmissing-prototypes] 5941 | int rnp_delete_knode(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 5941 | int rnp_delete_knode(struct net_device *dev, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:5: warning: no previous prototype for function 'rnp_config_knode' [-Wmissing-prototypes] 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:5: warning: no previous prototype for function 'rnp_setup_tc_cls_u32' [-Wmissing-prototypes] 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:6: warning: no previous prototype for function 'rnp_do_reset' [-Wmissing-prototypes] 6166 | void rnp_do_reset(struct net_device *netdev) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6166 | void rnp_do_reset(struct net_device *netdev) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6387:6: warning: no previous prototype for function 'rnp_clear_udp_tunnel_port' [-Wmissing-prototypes] 6387 | void rnp_clear_udp_tunnel_port(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6387:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6387 | void rnp_clear_udp_tunnel_port(struct rnp_adapter *adapter) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6507:6: warning: no previous prototype for function 'rnp_assign_netdev_ops' [-Wmissing-prototypes] 6507 | void rnp_assign_netdev_ops(struct net_device *dev) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6507:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6507 | void rnp_assign_netdev_ops(struct net_device *dev) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6683:5: warning: no previous prototype for function 'rnp_can_rpu_start' [-Wmissing-prototypes] 6683 | int rnp_can_rpu_start(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6683:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6683 | int rnp_can_rpu_start(struct rnp_adapter *adapter) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6536:29: warning: unused function 'rnp_tso_features' [-Wunused-function] 6536 | static inline unsigned long rnp_tso_features(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~ 26 warnings generated. -- >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Function parameter or member 'rnp_queue' not described in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Function parameter or member 'rnp_msix_vector' not described in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Excess function parameter 'queue' description in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Excess function parameter 'msix_vector' description in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:287: warning: Function parameter or member 'napi_budget' not described in 'rnp_clean_tx_irq' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:671: warning: Function parameter or member 'adapter' not described in 'rnp_rx_ring_reinit' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:1130: warning: Excess function parameter 'skb' description in 'rnp_is_non_eop' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2563: warning: Function parameter or member 'adapter' not described in 'rnp_tx_maxrate_own' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2563: warning: Excess function parameter 'netdev' description in 'rnp_tx_maxrate_own' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2563: warning: Excess function parameter 'maxrate' description in 'rnp_tx_maxrate_own' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3748: warning: Function parameter or member 'txqueue' not described in 'rnp_tx_timeout' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3857: warning: Function parameter or member 'adapter' not described in 'rnp_setup_tx_resources' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3950: warning: Function parameter or member 'adapter' not described in 'rnp_setup_rx_resources' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4612: warning: Excess function parameter 'link_speed' description in 'rnp_watchdog_update_link' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4812: warning: Function parameter or member 't' not described in 'rnp_service_timer' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4812: warning: Excess function parameter 'data' description in 'rnp_service_timer' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:5872: warning: Function parameter or member 'dev' not described in 'rnp_setup_tc' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:5872: warning: Excess function parameter 'netdev' description in 'rnp_setup_tc' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Function parameter or member 'adapter' not described in 'rnp_wol_supported' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Function parameter or member 'subdevice_id' not described in 'rnp_wol_supported' drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Excess function parameter 'hw' description in 'rnp_wol_supported' drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Excess function parameter 'subdev_id' description in 'rnp_wol_supported' drivers/net/ethernet/mucse/rnp/rnp_main.c:7099: warning: Function parameter or member 'id' not described in 'rnp_probe' drivers/net/ethernet/mucse/rnp/rnp_main.c:7099: warning: Excess function parameter 'ent' description in 'rnp_probe' -- In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:4: In file included from include/linux/pci.h:1499: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:1579: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:10: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ 9 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:9: In file included from include/linux/pci.h:1499: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:1579: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:5: warning: no previous prototype for function 'rnp_acquire_msix_vectors' [-Wmissing-prototypes] 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:6: warning: no previous prototype for function 'rnp_print_ring_info' [-Wmissing-prototypes] 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ | static 11 warnings generated. -- >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:179: warning: Function parameter or member 'data' not described in 'rnp_reg_test' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:466: warning: Function parameter or member 'dev' not described in 'rnp_get_ts_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:466: warning: Excess function parameter 'netdev' description in 'rnp_get_ts_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:527: warning: Function parameter or member 'dev' not described in 'rnp_get_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:527: warning: Excess function parameter 'netdev' description in 'rnp_get_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:561: warning: Function parameter or member 'dev' not described in 'rnp_set_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:561: warning: Excess function parameter 'netdev' description in 'rnp_set_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:600: warning: Function parameter or member 'dev' not described in 'rnp_get_module_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:600: warning: Excess function parameter 'netdev' description in 'rnp_get_module_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:653: warning: Function parameter or member 'dev' not described in 'rnp_get_module_eeprom' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:653: warning: Excess function parameter 'netdev' description in 'rnp_get_module_eeprom' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:700: warning: Function parameter or member 'ker' not described in 'rnp_get_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:700: warning: Function parameter or member 'extack' not described in 'rnp_get_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:725: warning: Function parameter or member 'ker' not described in 'rnp_set_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:725: warning: Function parameter or member 'extack' not described in 'rnp_set_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Function parameter or member 'coal' not described in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Function parameter or member 'kernel_coal' not described in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Function parameter or member 'extack' not described in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Excess function parameter 'cmd' description in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Excess function parameter 'ec' description in 'rnp_get_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:987: warning: Function parameter or member 'kernel_coal' not described in 'rnp_set_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:987: warning: Function parameter or member 'extack' not described in 'rnp_set_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:987: warning: Excess function parameter 'cmd' description in 'rnp_set_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:1778: warning: Function parameter or member 'dev' not described in 'rnp_set_rxnfc' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:1778: warning: Excess function parameter 'netdev' description in 'rnp_set_rxnfc' .. vim +/has_mac +298 drivers/net/ethernet/mucse/rnp/rnp_common.h 287 288 #ifndef NO_SKB_DUMP 289 static inline void _rnp_skb_dump(const struct sk_buff *skb, bool full_pkt) 290 { 291 static atomic_t can_dump_full = ATOMIC_INIT(5); 292 #ifdef DEBUG 293 struct skb_shared_info *sh = skb_shinfo(skb); 294 #endif 295 struct net_device *dev = skb->dev; 296 //struct sock *sk = skb->sk; 297 struct sk_buff *list_skb; > 298 bool has_mac, has_trans; > 299 int headroom, tailroom; 300 int i, len, seg_len; 301 const char *level = KERN_WARNING; 302 303 if (full_pkt) 304 full_pkt = atomic_dec_if_positive(&can_dump_full) >= 0; 305 306 if (full_pkt) 307 len = skb->len; 308 else 309 len = min_t(int, skb->len, MAX_HEADER + 128); 310 311 headroom = skb_headroom(skb); 312 tailroom = skb_tailroom(skb); 313 314 has_mac = skb_mac_header_was_set(skb); 315 has_trans = skb_transport_header_was_set(skb); 316 317 dbg("%sskb len=%u headroom=%u headlen=%u tailroom=%u\n" 318 "mac=(%d,%d) net=(%d,%d) trans=%d\n" 319 "shinfo(txflags=%u nr_frags=%u gso(size=%hu type=%u segs=%hu))\n" 320 "csum(0x%x ip_summed=%u complete_sw=%u valid=%u level=%u)\n" 321 "hash(0x%x sw=%u l4=%u) proto=0x%04x pkttype=%u iif=%d\n", 322 level, skb->len, headroom, skb_headlen(skb), tailroom, 323 has_mac ? skb->mac_header : -1, 324 has_mac ? (skb->network_header - skb->mac_header) : -1, 325 skb->network_header, 326 has_trans ? skb_network_header_len(skb) : -1, 327 has_trans ? skb->transport_header : -1, sh->tx_flags, 328 sh->nr_frags, sh->gso_size, sh->gso_type, sh->gso_segs, 329 skb->csum, skb->ip_summed, skb->csum_complete_sw, 330 skb->csum_valid, skb->csum_level, skb->hash, skb->sw_hash, 331 skb->l4_hash, ntohs(skb->protocol), skb->pkt_type, 332 skb->skb_iif); 333 334 if (dev) 335 dbg("%sdev name=%s feat=0x%pNF\n", level, dev->name, 336 &dev->features); 337 338 //if (full_pkt && headroom) 339 // print_hex_dump(level, "skb headroom: ", 340 // DUMP_PREFIX_OFFSET, 341 // 16, 1, skb->head, headroom, false); 342 343 seg_len = min_t(int, skb_headlen(skb), len); 344 if (seg_len) 345 print_hex_dump(level, "skb linear: ", DUMP_PREFIX_OFFSET, 346 16, 1, skb->data, seg_len, false); 347 len -= seg_len; 348 349 // if (full_pkt && tailroom) 350 // print_hex_dump(level, "skb tailroom: ", 351 // DUMP_PREFIX_OFFSET, 352 // 16, 1, skb_tail_pointer(skb), tailroom, false); 353 354 for (i = 0; len && i < skb_shinfo(skb)->nr_frags; i++) { 355 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 356 //u32 p_off, p_len, copied; 357 u32 p_len; 358 struct page *p; 359 u8 *vaddr; 360 361 p = skb_frag_address(frag); 362 p_len = skb_frag_size(frag); 363 seg_len = min_t(int, p_len, len); 364 vaddr = kmap_atomic(p); 365 print_hex_dump(level, "skb frag: ", DUMP_PREFIX_OFFSET, 366 16, 1, vaddr, seg_len, false); 367 kunmap_atomic(vaddr); 368 len -= seg_len; 369 if (!len) 370 break; 371 } 372 373 if (full_pkt && skb_has_frag_list(skb)) { 374 dbg("skb fraglist:\n"); 375 skb_walk_frags(skb, list_skb) 376 _rnp_skb_dump(list_skb, true); 377 } 378 } 379 #endif 380 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2566/2566] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c:279:5: warning: no previous prototype for function 'hclge_unic_del_mc_guid_common'
by kernel test robot 15 Dec '24

15 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6c3413fbf8c430b89f5d23f465e10e99ea145199 commit: a1799222294b713b168b8444b973c2b9d69c64d9 [2566/2566] UNIC: Support using MC GUID and table management config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241215/202412150919.g1didEmM-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/20241215/202412150919.g1didEmM-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/202412150919.g1didEmM-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c:16: In file included from include/linux/etherdevice.h:20: In file included from include/linux/if_ether.h:19: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:14: In file included from include/linux/mm.h:1573: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c:21: In file included from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h:11: include/net/devlink.h:28:19: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion] 28 | u32 reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE' 25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX) | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/net/devlink.h:29:26: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion] 29 | u32 remote_reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE' 25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX) | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c:170:5: warning: no previous prototype for function 'hclge_unic_add_mc_guid_common' [-Wmissing-prototypes] 170 | int hclge_unic_add_mc_guid_common(struct hclge_vport *vport, | ^ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c:170:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 170 | int hclge_unic_add_mc_guid_common(struct hclge_vport *vport, | ^ | static >> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c:279:5: warning: no previous prototype for function 'hclge_unic_del_mc_guid_common' [-Wmissing-prototypes] 279 | int hclge_unic_del_mc_guid_common(struct hclge_vport *vport, | ^ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c:279:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 279 | int hclge_unic_del_mc_guid_common(struct hclge_vport *vport, | ^ | static 9 warnings generated. vim +/hclge_unic_del_mc_guid_common +279 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_unic_guid.c 278 > 279 int hclge_unic_del_mc_guid_common(struct hclge_vport *vport, 280 const unsigned char *mguid) 281 { 282 struct hclge_unic_mc_guid_cfg_cmd req = {0}; 283 struct hclge_dev *hdev = vport->back; 284 struct hclge_desc desc[3]; 285 int ret; 286 287 memcpy(req.mguid, mguid, UBL_ALEN); 288 ret = hclge_unic_lookup_mc_guid(vport, &req, desc); 289 if (!ret) { 290 ret = hclge_unic_fill_del_desc(vport, &req, desc); 291 if (ret) 292 return ret; 293 if (hclge_unic_is_all_function_deleted(desc)) { 294 ret = hclge_unic_del_mc_guid_cmd(vport, &req, desc); 295 if (!ret) { 296 clear_bit(req.index, hdev->mc_guid_tbl_bmap); 297 hdev->used_mc_guid_num--; 298 } 299 } else { 300 return hclge_unic_add_mc_guid_cmd(vport, &req, desc); 301 } 302 } else if (ret == -ENOENT) { 303 ret = 0; 304 } 305 306 return ret; 307 } 308 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1613/1613] drivers/pci/controller/pci-loongson.c:183:22: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot 15 Dec '24

15 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: d68dc6ee371ec5466be9b2d76bdca0b360940adc commit: 668ae8b1a55a96a60303d36b81b112a709a324bb [1613/1613] PCI: LS7A2000: fix GPU card error config: loongarch-randconfig-r111-20241210 (https://download.01.org/0day-ci/archive/20241215/202412150516.jwknHegy-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241215/202412150516.jwknHegy-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/202412150516.jwknHegy-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/pci/controller/pci-loongson.c:183:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void volatile * @@ drivers/pci/controller/pci-loongson.c:183:22: sparse: expected void volatile [noderef] __iomem *addr drivers/pci/controller/pci-loongson.c:183:22: sparse: got void volatile * drivers/pci/controller/pci-loongson.c:184:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void volatile * @@ drivers/pci/controller/pci-loongson.c:184:29: sparse: expected void volatile [noderef] __iomem *addr drivers/pci/controller/pci-loongson.c:184:29: sparse: got void volatile * drivers/pci/controller/pci-loongson.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...): include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false vim +183 drivers/pci/controller/pci-loongson.c 151 152 static void loongson_display_quirk(struct pci_dev *dev) 153 { 154 u32 val; 155 u64 mask, size; 156 u64 max_size = 0; 157 int i, num; 158 struct pci_bus *bus = dev->bus; 159 160 if (!dev->bus->number) { 161 if (!(dev->vendor == PCI_VENDOR_ID_LOONGSON && dev->device == 0x7a25)) 162 return; 163 } else { 164 while (!pci_is_root_bus(bus->parent)) 165 bus = bus->parent; 166 167 /* ensure slot is 7a2000 */ 168 if (bus->self->vendor != PCI_VENDOR_ID_LOONGSON || bus->self->device < 0x7a39) 169 return; 170 } 171 max_size = 0; 172 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { 173 if (dev->resource[i].flags & IORESOURCE_MEM) { 174 size = dev->resource[i].end - dev->resource[i].start; 175 if (size > max_size) { 176 max_size = size; 177 num = i; 178 } 179 } 180 } 181 mask = ~(dev->resource[num].end - dev->resource[num].start); 182 val = (dev->resource[num].start >> (24 - 16)) | ((mask >> 24) & 0xffff); > 183 writel(val, (volatile void *)0x80000efdfb000174UL); 184 writel(0x80000000, (volatile void *)0x80000efdfb000170UL); 185 } 186 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, 0x7a25, loongson_display_quirk); 187 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, 188 PCI_BASE_CLASS_DISPLAY, 16, loongson_display_quirk); 189 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2566/2566] drivers/net/ethernet/hisilicon/hns3/hns3_unic.c:53: warning: Function parameter or member 'skb' not described in 'hns3_unic_set_l3_type'
by kernel test robot 15 Dec '24

15 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6c3413fbf8c430b89f5d23f465e10e99ea145199 commit: f52063cd675564192638518d0a6d428e330ec7e1 [2566/2566] UNIC: Replace ether interface by ubl interface config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241215/202412150525.dOfTAcoj-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/20241215/202412150525.dOfTAcoj-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/202412150525.dOfTAcoj-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/net/ethernet/hisilicon/hns3/hns3_unic.c:53: warning: Function parameter or member 'skb' not described in 'hns3_unic_set_l3_type' >> drivers/net/ethernet/hisilicon/hns3/hns3_unic.c:53: warning: Function parameter or member 'type_cs_vlan_tso' not described in 'hns3_unic_set_l3_type' vim +53 drivers/net/ethernet/hisilicon/hns3/hns3_unic.c 44 45 /** 46 * L3T is an element of the TX BD interface for software and hardware 47 * interaction, used to identify the message type. As the message data 48 * given by software to the chip cannot be self-decoded, the driver needs 49 * to actively inform the chip of the message type, which is unrelated 50 * to checksum offloading. 51 */ 52 void hns3_unic_set_l3_type(struct sk_buff *skb, u32 *type_cs_vlan_tso) > 53 { 54 if (skb->protocol == htons(ETH_P_IP)) 55 hnae3_set_field(*type_cs_vlan_tso, HNS3_TXD_L3T_M, 56 HNS3_TXD_L3T_S, HNS3_L3T_IPV4); 57 else if (skb->protocol == htons(ETH_P_IPV6)) 58 hnae3_set_field(*type_cs_vlan_tso, HNS3_TXD_L3T_M, 59 HNS3_TXD_L3T_S, HNS3_L3T_IPV6); 60 } 61 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1613/1613] kernel/sched/fair.c:175:5: sparse: sparse: symbol 'sysctl_sched_util_low_pct' was not declared. Should it be static?
by kernel test robot 15 Dec '24

15 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: d68dc6ee371ec5466be9b2d76bdca0b360940adc commit: 2e1dfc02d115143587ccfee1815ad295763050f2 [1613/1613] sched: Adjust wakeup cpu range according CPU util dynamicly config: loongarch-randconfig-r111-20241210 (https://download.01.org/0day-ci/archive/20241215/202412150117.ww1cPcQk-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241215/202412150117.ww1cPcQk-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/202412150117.ww1cPcQk-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> kernel/sched/fair.c:175:5: sparse: sparse: symbol 'sysctl_sched_util_low_pct' was not declared. Should it be static? kernel/sched/fair.c:1256:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_entity const *se @@ got struct sched_entity [noderef] __rcu * @@ kernel/sched/fair.c:1256:34: sparse: expected struct sched_entity const *se kernel/sched/fair.c:1256:34: sparse: got struct sched_entity [noderef] __rcu * kernel/sched/fair.c:12740:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12740:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:12740:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:6633:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:6633:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:6633:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:7964:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:7964:20: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:7964:20: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8258:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:8258:9: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/fair.c:8258:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8367:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:8367:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:8367:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:8941:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:8941:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:8941:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:9934:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:9934:40: sparse: expected struct sched_domain *child kernel/sched/fair.c:9934:40: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:10571:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:10571:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:10571:22: sparse: struct task_struct * kernel/sched/fair.c:12012:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12012:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:12012:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:11669:44: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *sd_parent @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:11669:44: sparse: expected struct sched_domain *sd_parent kernel/sched/fair.c:11669:44: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:12108:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12108:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:12108:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...): include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false kernel/sched/fair.c:6555:35: sparse: sparse: marked inline, but without a definition kernel/sched/fair.c: note: in included file: kernel/sched/sched.h:2145:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2145:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2145:25: sparse: struct task_struct * kernel/sched/sched.h:2309:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2309:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2309:9: sparse: struct task_struct * kernel/sched/sched.h:2145:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2145:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2145:25: sparse: struct task_struct * kernel/sched/sched.h:2145:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2145:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2145:25: sparse: struct task_struct * vim +/sysctl_sched_util_low_pct +175 kernel/sched/fair.c 168 169 #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY 170 /* 171 * Low utilization threshold for CPU 172 * 173 * (default: 85%), units: percentage of CPU utilization) 174 */ > 175 int sysctl_sched_util_low_pct = 85; 176 #endif 177 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1613/1613] drivers/video/fbdev/ls2k500sfb.c:143:27: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot 14 Dec '24

14 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: d68dc6ee371ec5466be9b2d76bdca0b360940adc commit: 8248d42b7c5f4338a54f26d8efebec8614b43466 [1613/1613] fbdev: add ls2k500sfb driver for ls2k500 bmc. config: loongarch-randconfig-r111-20241210 (https://download.01.org/0day-ci/archive/20241214/202412142141.pKNBHdWI-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241214/202412142141.pKNBHdWI-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/202412142141.pKNBHdWI-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/video/fbdev/ls2k500sfb.c:143:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static p @@ got void [noderef] __iomem * @@ drivers/video/fbdev/ls2k500sfb.c:143:27: sparse: expected void *static p drivers/video/fbdev/ls2k500sfb.c:143:27: sparse: got void [noderef] __iomem * >> drivers/video/fbdev/ls2k500sfb.c:145:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void *static p @@ drivers/video/fbdev/ls2k500sfb.c:145:30: sparse: expected void const volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:145:30: sparse: got void *static p >> drivers/video/fbdev/ls2k500sfb.c:199:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *static p @@ drivers/video/fbdev/ls2k500sfb.c:199:36: sparse: expected void volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:199:36: sparse: got void *static p >> drivers/video/fbdev/ls2k500sfb.c:201:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:201:37: sparse: expected void const volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:201:37: sparse: got void * >> drivers/video/fbdev/ls2k500sfb.c:254:13: sparse: sparse: symbol 'ls2k500sfb_interrupt' was not declared. Should it be static? drivers/video/fbdev/ls2k500sfb.c:320:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:320:22: sparse: expected void const volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:320:22: sparse: got void * >> drivers/video/fbdev/ls2k500sfb.c:320:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:320:49: sparse: expected void volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:320:49: sparse: got void * drivers/video/fbdev/ls2k500sfb.c:321:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:321:22: sparse: expected void const volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:321:22: sparse: got void * drivers/video/fbdev/ls2k500sfb.c:321:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:321:53: sparse: expected void volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:321:53: sparse: got void * drivers/video/fbdev/ls2k500sfb.c:322:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:322:22: sparse: expected void const volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:322:22: sparse: got void * drivers/video/fbdev/ls2k500sfb.c:322:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:322:53: sparse: expected void volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:322:53: sparse: got void * drivers/video/fbdev/ls2k500sfb.c:323:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:323:22: sparse: expected void const volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:323:22: sparse: got void * drivers/video/fbdev/ls2k500sfb.c:323:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@ drivers/video/fbdev/ls2k500sfb.c:323:51: sparse: expected void volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:323:51: sparse: got void * >> drivers/video/fbdev/ls2k500sfb.c:456:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got char *preg @@ drivers/video/fbdev/ls2k500sfb.c:456:28: sparse: expected void const volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:456:28: sparse: got char *preg >> drivers/video/fbdev/ls2k500sfb.c:457:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got char *preg @@ drivers/video/fbdev/ls2k500sfb.c:457:32: sparse: expected void volatile [noderef] __iomem *addr drivers/video/fbdev/ls2k500sfb.c:457:32: sparse: got char *preg >> drivers/video/fbdev/ls2k500sfb.c:569:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *penv @@ got void [noderef] __iomem * @@ drivers/video/fbdev/ls2k500sfb.c:569:19: sparse: expected char *penv drivers/video/fbdev/ls2k500sfb.c:569:19: sparse: got void [noderef] __iomem * >> drivers/video/fbdev/ls2k500sfb.c:570:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *preg @@ got void [noderef] __iomem * @@ drivers/video/fbdev/ls2k500sfb.c:570:19: sparse: expected char *preg drivers/video/fbdev/ls2k500sfb.c:570:19: sparse: got void [noderef] __iomem * drivers/video/fbdev/ls2k500sfb.c:671:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *penv @@ got void [noderef] __iomem * @@ drivers/video/fbdev/ls2k500sfb.c:671:14: sparse: expected char *penv drivers/video/fbdev/ls2k500sfb.c:671:14: sparse: got void [noderef] __iomem * drivers/video/fbdev/ls2k500sfb.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...): include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false vim +143 drivers/video/fbdev/ls2k500sfb.c 113 114 static void ls2k500sfb_events_fn(struct work_struct *work) 115 { 116 struct ls2k500sfb_struct *priv = container_of(work, struct ls2k500sfb_struct, work); 117 struct pci_dev *pdev = priv->dev; 118 struct pci_dev *ppdev = pdev->bus->self; 119 uint32_t i, d, timeout, retry = 0; 120 static const uint32_t index[] = { 121 0x10, 0x14, 0x18, 0x1c, 0x20, 0x24, 0x30, 0x3c, 0x54, 0x58, 0x78, 0x7c, 0x80, 4 122 }; 123 124 static uint32_t data[sizeof(index) / 4]; 125 static const uint32_t cindex[] = { 0x10, 0x3c, 4 }; 126 127 static uint32_t cdata[sizeof(cindex) / 4]; 128 static uint32_t d80c, d71c, ctrl; 129 static void *p; 130 131 if (!priv->running) { 132 for (i = 0; i < ARRAY_SIZE(index); i++) 133 pci_read_config_dword(ppdev, index[i], &data[i]); 134 for (i = 0; i < ARRAY_SIZE(cindex); i++) 135 pci_read_config_dword(pdev, cindex[i], &cdata[i]); 136 if (ppdev->vendor == 0x14) { 137 pci_read_config_dword(ppdev, 0x80c, &d80c); 138 d80c = (d80c & ~(3 << 17)) | (1 << 17); 139 140 pci_read_config_dword(ppdev, 0x71c, &d71c); 141 d71c |= 1 << 26; 142 > 143 p = pci_iomap(ppdev, 0, 0x100); 144 } > 145 ctrl = readl(p); 146 return; 147 } 148 local_bh_disable(); 149 pciebreak_smp_send_stop(100); 150 wmb(); /* flush all write before we disable pcie window */ 151 pci_write_config_dword(ppdev, 0x18, 0); 152 pci_write_config_dword(ppdev, 0x1c, 0); 153 pci_write_config_dword(ppdev, 0x20, 0); 154 atomic_set(&waiting_for_pciebreak_ipi, 0); 155 wmb(); /* flush all write after change pcie window */ 156 local_bh_enable(); 157 if (ppdev->vendor == 0x14) { 158 timeout = 10000; 159 while (timeout) { 160 pci_read_config_dword(ppdev, 0x10, &d); 161 d &= ~0xf; 162 if (!d) 163 break; 164 mdelay(1); 165 timeout--; 166 }; 167 if (!timeout) 168 pr_info("bar not clear 0\n"); 169 170 pci_read_config_dword(ppdev, 0x0, &d); 171 pr_info("pcie port deviceid=0x%x recover begin\n", d); 172 retrain: 173 while (1) { 174 pci_write_config_dword(ppdev, index[0], data[0]); 175 pci_read_config_dword(ppdev, index[0], &d); 176 d &= ~0xf; 177 if (d) 178 break; 179 mdelay(1); 180 } 181 182 while (1) { 183 for (i = 0; i < ARRAY_SIZE(index); i++) { 184 if (index[i] != 0x18 && index[i] != 0x1c && index[i] != 0x20) 185 pci_write_config_dword(ppdev, index[i], data[i]); 186 } 187 pci_write_config_dword(ppdev, 0x80c, d80c); 188 pci_write_config_dword(ppdev, 0x71c, d71c); 189 190 pci_read_config_dword(ppdev, 0x10, &d); 191 d &= ~0xf; 192 if (d) 193 break; 194 mdelay(1); 195 } 196 197 timeout = 10000; 198 > 199 writel(ctrl | 0x8, p); 200 while (1) { > 201 d = readl(p + 0xc); 202 if ((d & 0x11) == 0x11) { 203 break; 204 } else if (!timeout) { 205 pr_info("pcie train failed status=0x%x\n", d); 206 goto out; 207 } 208 mdelay(1); 209 timeout--; 210 } 211 212 213 pr_info("pcie recovered done\n"); 214 215 if (!retry) { 216 /*wait u-boot ddr config */ 217 set_current_state(TASK_UNINTERRUPTIBLE); 218 schedule_timeout(HZ*resetbootwait); 219 set_current_state(TASK_RUNNING); 220 pci_read_config_dword(ppdev, 0x10, &d); 221 d &= ~0xf; 222 if (!d) { 223 retry = 1; 224 goto retrain; 225 } 226 } 227 } else { 228 set_current_state(TASK_UNINTERRUPTIBLE); 229 schedule_timeout(HZ*resetbootwait); 230 set_current_state(TASK_RUNNING); 231 } 232 local_bh_disable(); 233 pciebreak_smp_send_stop(10000); 234 wmb(); /* flush all write before we update pcie window */ 235 for (i = 0; i < ARRAY_SIZE(index); i++) 236 pci_write_config_dword(ppdev, index[i], data[i]); 237 238 for (i = 0; i < ARRAY_SIZE(cindex); i++) 239 pci_write_config_dword(pdev, cindex[i], cdata[i]); 240 atomic_set(&waiting_for_pciebreak_ipi, 0); 241 wmb(); /* flush all write after we update pcie window */ 242 local_bh_enable(); 243 244 245 pr_info("redraw console\n"); 246 247 saved_console = fg_console; 248 switch_console(fg_console > 0?fg_console - 1 : fg_console + 1); 249 queue_delayed_work(priv->wq, &priv->redraw_work, HZ); 250 out: 251 priv->running = 0; 252 } 253 > 254 irqreturn_t ls2k500sfb_interrupt(int irq, void *arg) 255 { 256 struct ls2k500sfb_struct *priv = arg; 257 struct pci_dev *pdev = priv->dev; 258 259 if (irq == pdev->irq) 260 pr_info("ls2k500sfb pcie interrupt\n"); 261 else 262 pr_info("ls2k500sfb gpio interrupt\n"); 263 if (system_state != SYSTEM_RUNNING) 264 return IRQ_HANDLED; 265 266 if (!priv->running) { 267 if (!resetdelay || time_after(jiffies, priv->reset_time + resetdelay * HZ)) { 268 priv->running = 1; 269 queue_work(priv->wq, &priv->work); 270 } 271 priv->reset_time = jiffies; 272 } 273 return IRQ_HANDLED; 274 } 275 276 #ifdef CONFIG_LOONGARCH 277 #define GPIO_OEN ((void *)IO_BASE+0x1fe00000+0x500) 278 #define GPIO_FUNCEN ((void *)IO_BASE+0x1fe00000+0x504) 279 #define GPIO_OUT ((void *)IO_BASE+0x1fe00000+0x508) 280 #define GPIO_IN ((void *)IO_BASE+0x1fe00000+0x50c) 281 #define GPIO_INTPOL ((void *)IO_BASE+0x1fe00000+0x510) 282 #define GPIO_INTEN ((void *)IO_BASE+0x1fe00000+0x514) 283 284 static int gpiochip_match_name(struct gpio_chip *chip, void *data) 285 { 286 const char *name = data; 287 288 return !strcmp(chip->label, name); 289 } 290 static int get_gpio_irq_from_acpi_table(int gpio) 291 { 292 struct gpio_chip *chip; 293 struct gpio_desc *desc; 294 295 chip = gpiochip_find("LOON0007:00", gpiochip_match_name); 296 if (!chip) 297 return -ENOENT; 298 desc = gpiochip_request_own_desc(chip, gpio, "reboot", GPIO_LOOKUP_FLAGS_DEFAULT, GPIOD_IN); 299 if (!desc) 300 return -ENOENT; 301 return gpiod_to_irq(desc); 302 } 303 304 static int get_gpio_irq_from_acpi_gsi(int gpio) 305 { 306 int gsi = 16 + (gpio & 7); 307 308 return acpi_register_gsi(NULL, gsi, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW); 309 } 310 311 static int register_gpio_reboot_handler(struct ls2k500sfb_struct *priv) 312 { 313 int irq = get_gpio_irq_from_acpi_table(GPIO); 314 315 if (irq < 0) { 316 irq = get_gpio_irq_from_acpi_gsi(GPIO); 317 pr_notice("gsi gpio irq %d\n", irq); 318 } else 319 pr_notice("acpi gpio irq %d\n", irq); > 320 writel(readl(GPIO_OEN) | (0x1 << GPIO), GPIO_OEN); 321 writel(readl(GPIO_FUNCEN) & ~(0x1 << GPIO), GPIO_FUNCEN); > 322 writel(readl(GPIO_INTPOL) & ~(0x1 << GPIO), GPIO_INTPOL); > 323 writel(readl(GPIO_INTEN) | (0x1 << GPIO), GPIO_INTEN); 324 if (request_irq(irq, ls2k500sfb_interrupt, IRQF_SHARED | IRQF_TRIGGER_FALLING, 325 "ls2k500sfb", priv)) 326 pr_err("request_irq(%d) failed\n", irq); 327 return 0; 328 } 329 #endif 330 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6] mm/dynamic_pool: use __GENKSYMS__ to revert the kabi change
by Liu Shixin 14 Dec '24

14 Dec '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAO6NS -------------------------------- Revert the kabi change introduced by including <linux/dynamic_pool.h> for kabi trustlist standardization. Fixes: 3b6fa5506d80 ("mm: limit order to 0 when allocated from dynamic pool") Signed-off-by: Liu Shixin <liushixin2(a)huawei.com> --- mm/filemap.c | 2 ++ mm/readahead.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mm/filemap.c b/mm/filemap.c index edc223834cde..77a8947b8e5e 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -47,7 +47,9 @@ #include <linux/splice.h> #include <linux/huge_mm.h> #include <linux/pgtable.h> +#ifndef __GENKSYMS__ #include <linux/dynamic_pool.h> +#endif #include <asm/pgalloc.h> #include <asm/tlbflush.h> #include "internal.h" diff --git a/mm/readahead.c b/mm/readahead.c index 2486c625e724..438f142a3e74 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -128,7 +128,9 @@ #include <linux/blk-cgroup.h> #include <linux/fadvise.h> #include <linux/sched/mm.h> +#ifndef __GENKSYMS__ #include <linux/dynamic_pool.h> +#endif #include "internal.h" -- 2.34.1
2 1
0 0
[openeuler:OLK-6.6 1613/1613] arch/loongarch/kernel/dma.c:37:42: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot 14 Dec '24

14 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: d68dc6ee371ec5466be9b2d76bdca0b360940adc commit: 90d2bbc1ade2216bda17fb582a1aaabf7567478f [1613/1613] LoongArch: use arch specific phys_to_dma config: loongarch-randconfig-r111-20241210 (https://download.01.org/0day-ci/archive/20241214/202412141716.TzMSDkUc-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241214/202412141716.TzMSDkUc-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/202412141716.TzMSDkUc-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> arch/loongarch/kernel/dma.c:37:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void volatile * @@ arch/loongarch/kernel/dma.c:37:42: sparse: expected void const volatile [noderef] __iomem *addr arch/loongarch/kernel/dma.c:37:42: sparse: got void volatile * arch/loongarch/kernel/dma.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/slab.h, ...): include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false vim +37 arch/loongarch/kernel/dma.c 29 30 void acpi_arch_dma_setup(struct device *dev) 31 { 32 int ret; 33 u64 mask, end = 0; 34 const struct bus_dma_region *map = NULL; 35 36 if (node_id_offset == 0) { > 37 node_id_offset = ((readl(LS7A_DMA_CFG) & LS7A_DMA_NODE_MASK) >> LS7A_DMA_NODE_SHF); 38 node_id_offset += 36; 39 } 40 41 ret = acpi_dma_get_range(dev, &map); 42 if (!ret && map) { 43 const struct bus_dma_region *r = map; 44 45 for (end = 0; r->size; r++) { 46 if (r->dma_start + r->size - 1 > end) 47 end = r->dma_start + r->size - 1; 48 } 49 50 mask = DMA_BIT_MASK(ilog2(end) + 1); 51 dev->bus_dma_limit = end; 52 dev->dma_range_map = map; 53 dev->coherent_dma_mask = min(dev->coherent_dma_mask, mask); 54 *dev->dma_mask = min(*dev->dma_mask, mask); 55 } 56 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1636/1636] drivers/iommu/loongarch_iommu.c:610:6: warning: no previous prototype for 'domain_deattach_iommu'
by kernel test robot 14 Dec '24

14 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: d68dc6ee371ec5466be9b2d76bdca0b360940adc commit: 72fe4978ee346c10869113410da1b61710dd8d8f [1636/1636] LoongArch: add iommu support config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20241214/202412141302.zMMD8AS7-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241214/202412141302.zMMD8AS7-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/202412141302.zMMD8AS7-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/iommu/loongarch_iommu.c:610:6: warning: no previous prototype for 'domain_deattach_iommu' [-Wmissing-prototypes] 610 | void domain_deattach_iommu(struct dom_info *priv, struct iommu_info *info) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:651:29: warning: no previous prototype for 'lookup_rlooptable' [-Wmissing-prototypes] 651 | struct iommu_rlookup_entry *lookup_rlooptable(int pcisegment) | ^~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:662:25: warning: no previous prototype for 'find_iommu_by_dev' [-Wmissing-prototypes] 662 | struct loongarch_iommu *find_iommu_by_dev(struct pci_dev *pdev) | ^~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:684:22: warning: no previous prototype for 'iommu_init_device' [-Wmissing-prototypes] 684 | struct iommu_device *iommu_init_device(struct device *dev) | ^~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:721:22: warning: no previous prototype for 'la_iommu_probe_device' [-Wmissing-prototypes] 721 | struct iommu_device *la_iommu_probe_device(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:752:20: warning: no previous prototype for 'get_iommu_info_from_dom' [-Wmissing-prototypes] 752 | struct iommu_info *get_iommu_info_from_dom(struct dom_info *priv, struct loongarch_iommu *iommu) | ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:767:20: warning: no previous prototype for 'domain_attach_iommu' [-Wmissing-prototypes] 767 | struct iommu_info *domain_attach_iommu(struct dom_info *priv, struct loongarch_iommu *iommu) | ^~~~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:1197:25: warning: no previous prototype for 'loongarch_get_iommu_by_devid' [-Wmissing-prototypes] 1197 | struct loongarch_iommu *loongarch_get_iommu_by_devid(struct pci_dev *pdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:1215:6: warning: no previous prototype for 'check_device_compat' [-Wmissing-prototypes] 1215 | bool check_device_compat(struct pci_dev *pdev) | ^~~~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:1344:29: warning: no previous prototype for 'create_rlookup_entry' [-Wmissing-prototypes] 1344 | struct iommu_rlookup_entry *create_rlookup_entry(int pcisegment) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/iommu/loongarch_iommu.c:1765:19: warning: 'la_iommu_setup' defined but not used [-Wunused-function] 1765 | static int __init la_iommu_setup(char *str) | ^~~~~~~~~~~~~~ -- >> drivers/iommu/loongarch_iommu.c:1663: warning: Function parameter or member 'ivrs' not described in 'get_highest_supported_ivhd_type' vim +/domain_deattach_iommu +610 drivers/iommu/loongarch_iommu.c 609 > 610 void domain_deattach_iommu(struct dom_info *priv, struct iommu_info *info) 611 { 612 if ((priv == NULL) || (info == NULL) || 613 (info->dev_cnt != 0) || (info->iommu == NULL)) { 614 pr_err("%s invalid parameter", __func__); 615 return; 616 } 617 del_domain_from_list(info->iommu, priv); 618 domain_id_free(info->iommu, info->id); 619 spin_lock(&priv->lock); 620 list_del(&info->list); 621 spin_unlock(&priv->lock); 622 kfree(info); 623 } 624 625 static void la_iommu_domain_free(struct iommu_domain *domain) 626 { 627 struct dom_info *priv; 628 struct loongarch_iommu *iommu = NULL; 629 struct iommu_info *info, *tmp; 630 631 priv = to_dom_info(domain); 632 spin_lock(&priv->lock); 633 list_for_each_entry_safe(info, tmp, &priv->iommu_devlist, list) { 634 if (info->dev_cnt > 0) 635 detach_all_dev_by_domain(info); 636 iommu = info->iommu; 637 spin_unlock(&priv->lock); 638 domain_deattach_iommu(priv, info); 639 spin_lock(&priv->lock); 640 iommu_flush_iotlb(iommu); 641 if (!has_dom(iommu)) 642 iommu_translate_disable(iommu); 643 } 644 spin_unlock(&priv->lock); 645 mutex_lock(&priv->ptl_lock); 646 iommu_free_pagetable(priv); 647 mutex_unlock(&priv->ptl_lock); 648 dom_info_free(priv); 649 } 650 > 651 struct iommu_rlookup_entry *lookup_rlooptable(int pcisegment) 652 { 653 struct iommu_rlookup_entry *rlookupentry = NULL; 654 655 list_for_each_entry(rlookupentry, &la_rlookup_iommu_list, list) { 656 if (rlookupentry->pcisegment == pcisegment) 657 return rlookupentry; 658 } 659 return NULL; 660 } 661 > 662 struct loongarch_iommu *find_iommu_by_dev(struct pci_dev *pdev) 663 { 664 int pcisegment; 665 unsigned short devid; 666 struct iommu_rlookup_entry *rlookupentry = NULL; 667 struct loongarch_iommu *iommu = NULL; 668 struct pci_bus *bus = pdev->bus; 669 670 devid = PCI_DEVID(bus->number, pdev->devfn); 671 pcisegment = pci_domain_nr(bus); 672 rlookupentry = lookup_rlooptable(pcisegment); 673 if (rlookupentry == NULL) { 674 pr_info("%s find segment %d rlookupentry failed\n", __func__, 675 pcisegment); 676 return iommu; 677 } 678 iommu = rlookupentry->rlookup_table[devid]; 679 if (iommu && (!iommu->confbase)) 680 iommu = NULL; 681 return iommu; 682 } 683 > 684 struct iommu_device *iommu_init_device(struct device *dev) 685 { 686 struct la_iommu_dev_data *dev_data; 687 struct pci_dev *pdev = to_pci_dev(dev); 688 struct pci_bus *bus = pdev->bus; 689 unsigned short devid; 690 struct loongarch_iommu *iommu = NULL; 691 struct iommu_device *iommu_dev = ERR_PTR(-ENODEV); 692 693 if (!dev_is_pci(dev)) 694 return iommu_dev; 695 696 if (dev->archdata.iommu != NULL || bus == NULL) { 697 pr_info("LA-IOMMU: bdf:0x%x has added\n", pdev->devfn); 698 return iommu_dev; 699 } 700 iommu = find_iommu_by_dev(pdev); 701 if (iommu == NULL) { 702 pci_info(pdev, "%s find iommu failed by dev\n", __func__); 703 return iommu_dev; 704 } 705 dev_data = kzalloc(sizeof(*dev_data), GFP_KERNEL); 706 if (!dev_data) 707 return iommu_dev; 708 devid = PCI_DEVID(bus->number, pdev->devfn); 709 dev_data->bdf = devid; 710 711 pci_info(pdev, "%s bdf %#x iommu dev id %#x\n", __func__, dev_data->bdf, iommu->devid); 712 /* The initial state is 0, and 1 is added only when attach dev */ 713 dev_data->count = 0; 714 dev_data->iommu = iommu; 715 dev_data->dev = dev; 716 dev->archdata.iommu = dev_data; 717 iommu_dev = &iommu->iommu_dev; 718 return iommu_dev; 719 } 720 > 721 struct iommu_device *la_iommu_probe_device(struct device *dev) 722 { 723 return iommu_init_device(dev); 724 } 725 726 static struct iommu_group *la_iommu_device_group(struct device *dev) 727 { 728 struct iommu_group *group; 729 730 /* 731 * We don't support devices sharing stream IDs other than PCI RID 732 * aliases, since the necessary ID-to-device lookup becomes rather 733 * impractical given a potential sparse 32-bit stream ID space. 734 */ 735 if (dev_is_pci(dev)) 736 group = pci_device_group(dev); 737 else 738 group = generic_device_group(dev); 739 return group; 740 } 741 742 static void la_iommu_remove_device(struct device *dev) 743 { 744 struct la_iommu_dev_data *dev_data; 745 746 iommu_group_remove_device(dev); 747 dev_data = dev->archdata.iommu; 748 dev->archdata.iommu = NULL; 749 kfree(dev_data); 750 } 751 > 752 struct iommu_info *get_iommu_info_from_dom(struct dom_info *priv, struct loongarch_iommu *iommu) 753 { 754 struct iommu_info *info; 755 756 spin_lock(&priv->lock); 757 list_for_each_entry(info, &priv->iommu_devlist, list) { 758 if (info->iommu == iommu) { 759 spin_unlock(&priv->lock); 760 return info; 761 } 762 } 763 spin_unlock(&priv->lock); 764 return NULL; 765 } 766 > 767 struct iommu_info *domain_attach_iommu(struct dom_info *priv, struct loongarch_iommu *iommu) 768 { 769 u32 dir_ctrl; 770 struct iommu_info *info; 771 unsigned long phys; 772 773 info = get_iommu_info_from_dom(priv, iommu); 774 if (info) 775 return info; 776 777 info = kzalloc(sizeof(struct iommu_info), GFP_KERNEL_ACCOUNT); 778 if (!info) 779 return NULL; 780 781 INIT_LIST_HEAD(&info->dev_list); 782 info->iommu = iommu; 783 info->id = domain_id_alloc(iommu); 784 if (info->id == -1) { 785 pr_info("%s alloc id for domain failed\n", __func__); 786 kfree(info); 787 return NULL; 788 } 789 790 phys = virt_to_phys(priv->pgd); 791 dir_ctrl = (IOMMU_LEVEL_STRIDE << 26) | (IOMMU_LEVEL_SHIFT(2) << 20); 792 dir_ctrl |= (IOMMU_LEVEL_STRIDE << 16) | (IOMMU_LEVEL_SHIFT(1) << 10); 793 dir_ctrl |= (IOMMU_LEVEL_STRIDE << 6) | IOMMU_LEVEL_SHIFT(0); 794 iommu_write_regl(iommu, LA_IOMMU_DIR_CTRL(info->id), dir_ctrl); 795 iommu_write_regl(iommu, LA_IOMMU_PGD_HI(info->id), phys >> 32); 796 iommu_write_regl(iommu, LA_IOMMU_PGD_LO(info->id), phys & UINT_MAX); 797 798 spin_lock(&priv->lock); 799 list_add(&info->list, &priv->iommu_devlist); 800 spin_unlock(&priv->lock); 801 add_domain_to_list(iommu, priv); 802 return info; 803 } 804 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • ...
  • 1829
  • Older →

HyperKitty Powered by HyperKitty