Kernel
  Threads by month 
                
            - ----- 2025 -----
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2024 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2023 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2022 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2021 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2020 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2019 -----
 - December
 
- 30 participants
 - 21067 discussions
 
                        
                            
                                
                            
                            [PATCH openEuler-1.0-LTS 1/2] [Backport] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()
                        
                        
by Lin Ruifeng 23 Jan '25
                    by Lin Ruifeng 23 Jan '25
23 Jan '25
                    
                        From: Ignat Korchagin <ignat(a)cloudflare.com>
stable inclusion
from stable-v5.10.231
commit daa13175a6dea312a76099066cb4cbd4fc959a84
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBEANO
CVE: CVE-2024-56605
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
[ Upstream commit 7c4f78cdb8e7501e9f92d291a7d956591bf73be9 ]
bt_sock_alloc() allocates the sk object and attaches it to the provided
sock object. On error l2cap_sock_alloc() frees the sk object, but the
dangling pointer is still attached to the sock object, which may create
use-after-free in other code.
Signed-off-by: Ignat Korchagin <ignat(a)cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu(a)amazon.com>
Reviewed-by: Eric Dumazet <edumazet(a)google.com>
Link: https://patch.msgid.link/20241014153808.51894-3-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
Signed-off-by: Lin Ruifeng <linruifeng4(a)huawei.com>
---
 net/bluetooth/l2cap_sock.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index bcada51cb01e..9f4a4391f6fe 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1629,6 +1629,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
 	chan = l2cap_chan_create();
 	if (!chan) {
 		sk_free(sk);
+		sock->sk = NULL;
 		return NULL;
 	}
 
-- 
2.22.0
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            2
                            
                          
                          
                            
    
                          
                        
                    23 Jan '25
                    
                        From: Chen Jun <chenjun102(a)huawei.com>
mainline inclusion
from mainline-v6.10-rc1
commit 9198ffbd2b494daae3a67cac1d59c3a2754e64cd
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBH72Q
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
When kmalloc_node() is called without __GFP_THISNODE and the target node
lacks sufficient memory, SLUB allocates a folio from a different node
other than the requested node, instead of taking a partial slab from it.
However, since the allocated folio does not belong to the requested
node, on the following allocation it is deactivated and added to the
partial slab list of the node it belongs to.
This behavior can result in excessive memory usage when the requested
node has insufficient memory, as SLUB will repeatedly allocate folios
from other nodes without reusing the previously allocated ones.
To prevent memory wastage, when a preferred node is indicated (not
NUMA_NO_NODE) but without a prior __GFP_THISNODE constraint:
1) try to get a partial slab from target node only by having
   __GFP_THISNODE in pc.flags for get_partial()
2) if 1) failed, try to allocate a new slab from target node with
   GFP_NOWAIT | __GFP_THISNODE opportunistically.
3) if 2) failed, retry with original gfpflags which will allow
   get_partial() try partial lists of other nodes before potentially
   allocating new page from other nodes
Without a preferred node, or with __GFP_THISNODE constraint, the
behavior remains unchanged.
On qemu with 4 numa nodes and each numa has 1G memory. Write a test ko
to call kmalloc_node(196, GFP_KERNEL, 3) for (4 * 1024 + 4) * 1024 times.
cat /proc/slabinfo shows:
kmalloc-256       4200530 13519712    256   32    2 : tunables..
after this patch,
cat /proc/slabinfo shows:
kmalloc-256       4200558 4200768    256   32    2 : tunables..
Signed-off-by: Chen Jun <chenjun102(a)huawei.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang(a)huawei.com>
Signed-off-by: Vlastimil Babka <vbabka(a)suse.cz>
Conflicts:
	mm/slub.c
[The conflict is large. Because OLK-5.10 does not merge mainline patch
53a0de06e50acb372c75d87fcc72ddfdf4a060ee ("mm, slub: dissolve
new_slab_objects() into ___slab_alloc()")]
Signed-off-by: Kaixiong Yu <yukaixiong(a)huawei.com>
---
 mm/slub.c | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 9dd4cc478ec3..d4e7e88df7ff 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2105,7 +2105,7 @@ static void *get_partial(struct kmem_cache *s, gfp_t flags, int node,
 		searchnode = numa_mem_id();
 
 	object = get_partial_node(s, get_node(s, searchnode), c, flags);
-	if (object || node != NUMA_NO_NODE)
+	if (object || (node != NUMA_NO_NODE && (flags & __GFP_THISNODE)))
 		return object;
 
 	return get_any_partial(s, flags, c);
@@ -2687,6 +2687,8 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
 {
 	void *freelist;
 	struct page *page;
+	bool try_thisnode = true;
+	gfp_t pc_gfpflags;
 
 	stat(s, ALLOC_SLOWPATH);
 
@@ -2764,9 +2766,33 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
 		goto redo;
 	}
 
-	freelist = new_slab_objects(s, gfpflags, node, &c);
+new_objects:
+
+	pc_gfpflags = gfpflags;
+	/*
+	 * When a preferred node is indicated but no __GFP_THISNODE
+	 *
+	 * 1) try to get a partial slab from target node only by having
+	 *    __GFP_THISNODE in pc_gfpflags for new_slab_objects()
+	 * 2) if 1) failed, try to allocate a new slab from target node with
+	 *    GPF_NOWAIT | __GFP_THISNODE opportunistically
+	 * 3) if 2) failed, retry with original gfpflags which will allow
+	 *    new_slab_objects() try partial lists of other nodes before potentially
+	 *    allocating new page from other nodes
+	 */
+	if (unlikely(node != NUMA_NO_NODE && !(gfpflags & __GFP_THISNODE)
+		     && try_thisnode))
+		pc_gfpflags = GFP_NOWAIT | __GFP_THISNODE;
+
+	freelist = new_slab_objects(s, pc_gfpflags, node, &c);
 
 	if (unlikely(!freelist)) {
+		if (node != NUMA_NO_NODE && !(gfpflags & __GFP_THISNODE)
+		    && try_thisnode) {
+			try_thisnode = false;
+			goto new_objects;
+		}
+
 		slab_out_of_memory(s, gfpflags, node);
 		return NULL;
 	}
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [PATCH OLK-6.6 0/4] swiotlb: fix swiotlb_bounce() to do partial sync's correctly
                        
                        
by Kaixiong Yu 23 Jan '25
                    by Kaixiong Yu 23 Jan '25
23 Jan '25
                    
                        task:merge mainline patches into OLK-6.6 
Michael Kelley (3):
  swiotlb: fix swiotlb_bounce() to do partial sync's correctly
  swiotlb: remove alloc_size argument to swiotlb_tbl_map_single()
  iommu/dma: fix zeroing of bounce buffer padding used by untrusted
    devices
Petr Tesarik (1):
  swiotlb: extend buffer pre-padding to alloc_align_mask if necessary
 drivers/iommu/dma-iommu.c |  31 +++++----
 drivers/xen/swiotlb-xen.c |   2 +-
 include/linux/iova.h      |   5 ++
 include/linux/swiotlb.h   |   2 +-
 kernel/dma/swiotlb.c      | 143 ++++++++++++++++++++++++++------------
 5 files changed, 124 insertions(+), 59 deletions(-)
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            5
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [PATCH OLK-6.6] btrfs: avoid NULL pointer dereference if no valid extent tree
                        
                        
by Yifan Qiao 23 Jan '25
                    by Yifan Qiao 23 Jan '25
23 Jan '25
                    
                        From: Qu Wenruo <wqu(a)suse.com>
stable inclusion
from stable-v6.6.72
commit 24b85a8b0310e0144da9ab30be42e87e6476638a
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBJ6RT
CVE: CVE-2025-21658
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
[ Upstream commit 6aecd91a5c5b68939cf4169e32bc49f3cd2dd329 ]
[BUG]
Syzbot reported a crash with the following call trace:
  BTRFS info (device loop0): scrub: started on devid 1
  BUG: kernel NULL pointer dereference, address: 0000000000000208
  #PF: supervisor read access in kernel mode
  #PF: error_code(0x0000) - not-present page
  PGD 106e70067 P4D 106e70067 PUD 107143067 PMD 0
  Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
  CPU: 1 UID: 0 PID: 689 Comm: repro Kdump: loaded Tainted: G           O       6.13.0-rc4-custom+ #206
  Tainted: [O]=OOT_MODULE
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022
  RIP: 0010:find_first_extent_item+0x26/0x1f0 [btrfs]
  Call Trace:
   <TASK>
   scrub_find_fill_first_stripe+0x13d/0x3b0 [btrfs]
   scrub_simple_mirror+0x175/0x260 [btrfs]
   scrub_stripe+0x5d4/0x6c0 [btrfs]
   scrub_chunk+0xbb/0x170 [btrfs]
   scrub_enumerate_chunks+0x2f4/0x5f0 [btrfs]
   btrfs_scrub_dev+0x240/0x600 [btrfs]
   btrfs_ioctl+0x1dc8/0x2fa0 [btrfs]
   ? do_sys_openat2+0xa5/0xf0
   __x64_sys_ioctl+0x97/0xc0
   do_syscall_64+0x4f/0x120
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
   </TASK>
[CAUSE]
The reproducer is using a corrupted image where extent tree root is
corrupted, thus forcing to use "rescue=all,ro" mount option to mount the
image.
Then it triggered a scrub, but since scrub relies on extent tree to find
where the data/metadata extents are, scrub_find_fill_first_stripe()
relies on an non-empty extent root.
But unfortunately scrub_find_fill_first_stripe() doesn't really expect
an NULL pointer for extent root, it use extent_root to grab fs_info and
triggered a NULL pointer dereference.
[FIX]
Add an extra check for a valid extent root at the beginning of
scrub_find_fill_first_stripe().
The new error path is introduced by 42437a6386ff ("btrfs: introduce
mount option rescue=ignorebadroots"), but that's pretty old, and later
commit b979547513ff ("btrfs: scrub: introduce helper to find and fill
sector info for a scrub_stripe") changed how we do scrub.
So for kernels older than 6.6, the fix will need manual backport.
Reported-by: syzbot+339e9dbe3a2ca419b85d(a)syzkaller.appspotmail.com
Link: https://lore.kernel.org/linux-btrfs/67756935.050a0220.25abdd.0a12.GAE@googl…
Fixes: 42437a6386ff ("btrfs: introduce mount option rescue=ignorebadroots")
Reviewed-by: Anand Jain <anand.jain(a)oracle.com>
Signed-off-by: Qu Wenruo <wqu(a)suse.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
Signed-off-by: Yifan Qiao <qiaoyifan4(a)huawei.com>
---
 fs/btrfs/scrub.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index a2d91d9f8a10..6be092bb814f 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -1538,6 +1538,10 @@ static int scrub_find_fill_first_stripe(struct btrfs_block_group *bg,
 	u64 extent_gen;
 	int ret;
 
+	if (unlikely(!extent_root)) {
+		btrfs_err(fs_info, "no valid extent root for scrub");
+		return -EUCLEAN;
+	}
 	memset(stripe->sectors, 0, sizeof(struct scrub_sector_verification) *
 				   stripe->nr_sectors);
 	scrub_stripe_reset_bitmaps(stripe);
-- 
2.39.2
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:openEuler-1.0-LTS] BUILD REGRESSION 797ab005d487202cbf361ae3eae41cf56f289789
                        
                        
by kernel test robot 23 Jan '25
                    by kernel test robot 23 Jan '25
23 Jan '25
                    
                        tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
branch HEAD: 797ab005d487202cbf361ae3eae41cf56f289789  !14933  scsi: sg: Fix slab-use-after-free read in sg_release()
Error/Warning (recently discovered and may have been fixed):
    https://lore.kernel.org/oe-kbuild-all/202501230126.3VPcPXBh-lkp@intel.com
    drivers/hwmon/f71882fg.o: warning: objtool: show_pwm_enable()+0xb1: can't find switch jump table
    drivers/media/dvb-frontends/af9013.o: warning: objtool: af9013_get_frontend()+0x11f: can't find switch jump table
    drivers/media/dvb-frontends/af9033.o: warning: objtool: af9033_get_frontend()+0x16a: can't find switch jump table
    drivers/media/dvb-frontends/cxd2820r_t2.o: warning: objtool: cxd2820r_get_frontend_t2()+0x202: can't find switch jump table
    drivers/staging/comedi/drivers/dt282x.o: warning: objtool: dt282x_ai_cmdtest()+0x799: can't find switch jump table
    drivers/usb/gadget/udc/core.o: warning: objtool: usb_gadget_ep_match_desc()+0x359: can't find switch jump table
    sound/pci/hda/hda_auto_parser.o: warning: objtool: hda_get_input_pin_label()+0x151: can't find switch jump table
    sound/pci/hda/hda_intel.o: warning: objtool: azx_init_pci()+0x16e: can't find switch jump table
    sound/pci/ice1712/delta.o: warning: objtool: snd_cs8403_decode_spdif_bits()+0xa7: can't find switch jump table
    sound/pci/ice1712/ice1712.o: warning: objtool: snd_ice1712_pro_route_spdif_get()+0x195: can't find switch jump table
    sound/pci/rme32.o: warning: objtool: snd_rme32_playback_spdif_open()+0x2f0: can't find switch jump table
    sound/pci/rme96.o: warning: objtool: snd_rme96_put_inputtype_control()+0x386: can't find switch jump table
Error/Warning ids grouped by kconfigs:
recent_errors
|-- arm64-allmodconfig
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-__bio_stage_hierarchy_start
|   |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used
|   |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_issue
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_requeue
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len
|   `-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast
|-- arm64-allnoconfig
|   |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled
|-- arm64-randconfig-001-20250122
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_issue
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_requeue
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   |-- include-linux-list.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node
|   |-- include-linux-list.h:warning:storing-the-address-of-local-variable-tmp-in-((struct-list_head-)lip)-.prev
|   |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used
|   `-- include-linux-plist.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node
|-- arm64-randconfig-002-20250122
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   |-- include-linux-list.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node
|   |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used
|   `-- include-linux-plist.h:warning:array-subscript-is-outside-array-bounds-of-struct-plist_node
|-- arm64-randconfig-003-20250122
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used
|   |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_issue
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_requeue
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast
|   |-- include-linux-list.h:warning:storing-the-address-of-local-variable-tmp-in-((struct-list_head-)lip)-.prev
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled
|-- arm64-randconfig-004-20250122
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_issue
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-wbt_requeue
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   `-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|-- x86_64-allmodconfig
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used
|   |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used
|   `-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests
|-- x86_64-allnoconfig
|   |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration
|-- x86_64-allyesconfig
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-function-__bio_integrity_free
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used
|   |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-function-wbt_issue
|   |-- block-blk-wbt.c:warning:no-previous-prototype-for-function-wbt_requeue
|   |-- block-genhd.c:warning:no-previous-prototype-for-function-disk_scan_partitions
|   |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union
|   |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len
|   `-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|-- x86_64-buildonly-randconfig-001-20250122
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-blkg-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-delta-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-now-not-described-in-blkcg_add_delay
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-q-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-cgroup.c:warning:Function-parameter-or-member-use_memdelay-not-described-in-blkcg_schedule_throttle
|   |-- block-blk-iolatency.c:warning:variable-blkiolat-set-but-not-used
|   |-- block-blk-iolatency.c:warning:variable-changed-set-but-not-used
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union
|   |-- drivers-hid-i2c-hid-.tmp_i2c-hid-core.o:warning:objtool:missing-symbol-for-section-.init.text
|   |-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast
|   |-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled
|   `-- net-tipc-.tmp_topsrv.o:warning:objtool:missing-symbol-for-section-.init.text
|-- x86_64-buildonly-randconfig-002-20250122
|   |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call
|   |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE.
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests
|   |-- block-genhd.c:warning:no-previous-prototype-for-function-disk_scan_partitions
|   |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration
|-- x86_64-buildonly-randconfig-003-20250122
|   |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call
|   |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE.
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled
|-- x86_64-buildonly-randconfig-004-20250122
|   |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call
|   |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE.
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union
|   |-- drivers-iio-light-si1133.o:warning:objtool:missing-symbol-for-section-.exit.text
|   |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-len
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used
|   |-- kernel-trace-preemptirq_delay_test.o:warning:objtool:missing-symbol-for-section-.init.text
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled
|-- x86_64-buildonly-randconfig-005-20250122
|   |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call
|   |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE.
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-__bio_integrity_free
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-blk-rq-qos.o:warning:objtool:missing-symbol-for-section-.text
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   |-- crypto-sm4_generic.o:warning:objtool:missing-symbol-for-section-.text
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   |-- include-linux-mempolicy.h:warning:__do_mbind-defined-but-not-used
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled
|-- x86_64-buildonly-randconfig-006-20250122
|   |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call
|   |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE.
|   |-- block-bio-integrity.c:warning:no-previous-prototype-for-function-__bio_integrity_free
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-function-__blk_mq_sched_dispatch_requests
|   |-- block-genhd.c:warning:no-previous-prototype-for-function-disk_scan_partitions
|   |-- crypto-sm4_generic.o:warning:objtool:missing-symbol-for-section-.text
|   |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union
|   |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union
|   |-- kernel-seccomp.o:warning:objtool:__secure_computing:unreachable-instruction
|   |-- mm-memory_hotplug.o:warning:objtool:__remove_pages:unreachable-instruction
|   |-- mm-vmalloc.o:warning:objtool:vmap_range_noflush:unreachable-instruction
|   `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration
|-- x86_64-defconfig
|   |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call
|   |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE.
|   |-- block-blk-merge.c:warning:no-previous-prototype-for-blk_try_req_merge
|   |-- block-blk-mq-sched.c:warning:no-previous-prototype-for-__blk_mq_sched_dispatch_requests
|   |-- block-genhd.c:warning:no-previous-prototype-for-disk_scan_partitions
|   `-- include-linux-kernel.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast
`-- x86_64-randconfig-101-20250122
    |-- drivers-hwmon-f71882fg.o:warning:objtool:show_pwm_enable:can-t-find-switch-jump-table
    |-- drivers-media-dvb-frontends-af9013.o:warning:objtool:af9013_get_frontend:can-t-find-switch-jump-table
    |-- drivers-media-dvb-frontends-af9033.o:warning:objtool:af9033_get_frontend:can-t-find-switch-jump-table
    |-- drivers-media-dvb-frontends-cxd2820r_t2.o:warning:objtool:cxd2820r_get_frontend_t2:can-t-find-switch-jump-table
    |-- drivers-staging-comedi-drivers-dt282x.o:warning:objtool:dt282x_ai_cmdtest:can-t-find-switch-jump-table
    |-- drivers-usb-gadget-udc-core.o:warning:objtool:usb_gadget_ep_match_desc:can-t-find-switch-jump-table
    |-- sound-pci-hda-hda_auto_parser.o:warning:objtool:hda_get_input_pin_label:can-t-find-switch-jump-table
    |-- sound-pci-hda-hda_intel.o:warning:objtool:azx_init_pci:can-t-find-switch-jump-table
    |-- sound-pci-ice1712-delta.o:warning:objtool:snd_cs8403_decode_spdif_bits:can-t-find-switch-jump-table
    |-- sound-pci-ice1712-ice1712.o:warning:objtool:snd_ice1712_pro_route_spdif_get:can-t-find-switch-jump-table
    |-- sound-pci-rme32.o:warning:objtool:snd_rme32_playback_spdif_open:can-t-find-switch-jump-table
    `-- sound-pci-rme96.o:warning:objtool:snd_rme96_put_inputtype_control:can-t-find-switch-jump-table
elapsed time: 763m
configs tested: 15
configs skipped: 107
tested configs:
arm64                        allmodconfig    gcc-14.2.0
arm64                         allnoconfig    gcc-14.2.0
arm64             randconfig-001-20250122    gcc-14.2.0
arm64             randconfig-002-20250122    gcc-14.2.0
arm64             randconfig-003-20250122    gcc-14.2.0
arm64             randconfig-004-20250122    gcc-14.2.0
x86_64                        allnoconfig    clang-19
x86_64                       allyesconfig    clang-19
x86_64  buildonly-randconfig-001-20250122    gcc-12
x86_64  buildonly-randconfig-002-20250122    clang-19
x86_64  buildonly-randconfig-003-20250122    gcc-12
x86_64  buildonly-randconfig-004-20250122    gcc-12
x86_64  buildonly-randconfig-005-20250122    gcc-12
x86_64  buildonly-randconfig-006-20250122    clang-19
x86_64                          defconfig    gcc-11
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:OLK-6.6 1839/1839] drivers/gpu/drm/phytium/phytium_pci.c:236:9: error: call to undeclared function 'pci_enable_msi'; ISO C99 and later do not support implicit function declarations
                        
                        
by kernel test robot 23 Jan '25
                    by kernel test robot 23 Jan '25
23 Jan '25
                    
                        Hi Li,
First bad commit (maybe != root cause):
tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   cd78f9c5f86e6865625e2d4640e63616a82fbd6c
commit: 792b82446538ed840a6e23b89673ce21564702bd [1839/1839] Fix gic support for Phytium S2500
config: arm64-randconfig-003-20250123 (https://download.01.org/0day-ci/archive/20250123/202501230201.ng7IvX9g-lkp@…)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project c23f2417dc5f6dc371afb07af5627ec2a9d373a0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250123/202501230201.ng7IvX9g-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/202501230201.ng7IvX9g-lkp@intel.com/
All errors (new ones prefixed by >>):
   In file included from drivers/gpu/drm/phytium/phytium_pci.c:7:
   In file included from include/linux/pci.h:2106:
   In file included from arch/arm64/include/asm/pci.h:7:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2193:
   include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     508 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     509 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     515 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     516 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     527 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     528 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     536 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     537 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/phytium/phytium_pci.c:23:6: warning: no previous prototype for function 'phytium_pci_vram_hw_init' [-Wmissing-prototypes]
      23 | void phytium_pci_vram_hw_init(struct phytium_display_private *priv)
         |      ^
   drivers/gpu/drm/phytium/phytium_pci.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      23 | void phytium_pci_vram_hw_init(struct phytium_display_private *priv)
         | ^
         | static 
   drivers/gpu/drm/phytium/phytium_pci.c:30:5: warning: no previous prototype for function 'phytium_pci_vram_init' [-Wmissing-prototypes]
      30 | int phytium_pci_vram_init(struct pci_dev *pdev, struct phytium_display_private *priv)
         |     ^
   drivers/gpu/drm/phytium/phytium_pci.c:30:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      30 | int phytium_pci_vram_init(struct pci_dev *pdev, struct phytium_display_private *priv)
         | ^
         | static 
   drivers/gpu/drm/phytium/phytium_pci.c:68:6: warning: no previous prototype for function 'phytium_pci_vram_fini' [-Wmissing-prototypes]
      68 | void phytium_pci_vram_fini(struct pci_dev *pdev, struct phytium_display_private *priv)
         |      ^
   drivers/gpu/drm/phytium/phytium_pci.c:68:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      68 | void phytium_pci_vram_fini(struct pci_dev *pdev, struct phytium_display_private *priv)
         | ^
         | static 
   drivers/gpu/drm/phytium/phytium_pci.c:89:5: warning: no previous prototype for function 'phytium_pci_dma_init' [-Wmissing-prototypes]
      89 | int phytium_pci_dma_init(struct phytium_display_private *priv)
         |     ^
   drivers/gpu/drm/phytium/phytium_pci.c:89:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      89 | int phytium_pci_dma_init(struct phytium_display_private *priv)
         | ^
         | static 
   drivers/gpu/drm/phytium/phytium_pci.c:137:6: warning: no previous prototype for function 'phytium_pci_dma_fini' [-Wmissing-prototypes]
     137 | void phytium_pci_dma_fini(struct phytium_display_private *priv)
         |      ^
   drivers/gpu/drm/phytium/phytium_pci.c:137:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     137 | void phytium_pci_dma_fini(struct phytium_display_private *priv)
         | ^
         | static 
>> drivers/gpu/drm/phytium/phytium_pci.c:236:9: error: call to undeclared function 'pci_enable_msi'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     236 |                 ret = pci_enable_msi(pdev);
         |                       ^
>> drivers/gpu/drm/phytium/phytium_pci.c:271:3: error: call to undeclared function 'pci_disable_msi'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     271 |                 pci_disable_msi(pdev);
         |                 ^
   drivers/gpu/drm/phytium/phytium_pci.c:271:3: note: did you mean 'pci_disable_sriov'?
   include/linux/pci.h:2437:20: note: 'pci_disable_sriov' declared here
    2437 | static inline void pci_disable_sriov(struct pci_dev *dev) { }
         |                    ^
   drivers/gpu/drm/phytium/phytium_pci.c:291:3: error: call to undeclared function 'pci_disable_msi'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     291 |                 pci_disable_msi(pdev);
         |                 ^
   10 warnings and 3 errors generated.
vim +/pci_enable_msi +236 drivers/gpu/drm/phytium/phytium_pci.c
b80df10f845813 lishuo 2024-01-31  215  
b80df10f845813 lishuo 2024-01-31  216  static int phytium_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
b80df10f845813 lishuo 2024-01-31  217  {
b80df10f845813 lishuo 2024-01-31  218  	struct phytium_display_private *priv = NULL;
b80df10f845813 lishuo 2024-01-31  219  	struct drm_device *dev = NULL;
b80df10f845813 lishuo 2024-01-31  220  	int ret = 0;
b80df10f845813 lishuo 2024-01-31  221  
b80df10f845813 lishuo 2024-01-31  222  	dev = drm_dev_alloc(&phytium_display_drm_driver, &pdev->dev);
b80df10f845813 lishuo 2024-01-31  223  	if (IS_ERR(dev)) {
b80df10f845813 lishuo 2024-01-31  224  		DRM_ERROR("failed to allocate drm_device\n");
b80df10f845813 lishuo 2024-01-31  225  		return PTR_ERR(dev);
b80df10f845813 lishuo 2024-01-31  226  	}
b80df10f845813 lishuo 2024-01-31  227  	pci_set_drvdata(pdev, dev);
b80df10f845813 lishuo 2024-01-31  228  	pci_set_master(pdev);
b80df10f845813 lishuo 2024-01-31  229  	ret = pci_enable_device(pdev);
b80df10f845813 lishuo 2024-01-31  230  	if (ret) {
b80df10f845813 lishuo 2024-01-31  231  		DRM_ERROR("pci enable device fail\n");
b80df10f845813 lishuo 2024-01-31  232  		goto failed_enable_device;
b80df10f845813 lishuo 2024-01-31  233  	}
b80df10f845813 lishuo 2024-01-31  234  
b80df10f845813 lishuo 2024-01-31  235  	if (dc_msi_enable) {
b80df10f845813 lishuo 2024-01-31 @236  		ret = pci_enable_msi(pdev);
b80df10f845813 lishuo 2024-01-31  237  		if (ret)
b80df10f845813 lishuo 2024-01-31  238  			DRM_ERROR("pci enable msi fail\n");
b80df10f845813 lishuo 2024-01-31  239  	}
b80df10f845813 lishuo 2024-01-31  240  
b80df10f845813 lishuo 2024-01-31  241  	dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
b80df10f845813 lishuo 2024-01-31  242  
b80df10f845813 lishuo 2024-01-31  243  	priv = phytium_pci_private_init(pdev, ent);
b80df10f845813 lishuo 2024-01-31  244  	if (priv)
b80df10f845813 lishuo 2024-01-31  245  		dev->dev_private = priv;
b80df10f845813 lishuo 2024-01-31  246  	else
b80df10f845813 lishuo 2024-01-31  247  		goto failed_pci_private_init;
b80df10f845813 lishuo 2024-01-31  248  
b80df10f845813 lishuo 2024-01-31  249  	ret = phytium_pci_vram_init(pdev, priv);
b80df10f845813 lishuo 2024-01-31  250  	if (ret) {
b80df10f845813 lishuo 2024-01-31  251  		DRM_ERROR("failed to init pci vram\n");
b80df10f845813 lishuo 2024-01-31  252  		goto failed_pci_vram_init;
b80df10f845813 lishuo 2024-01-31  253  	}
b80df10f845813 lishuo 2024-01-31  254  
b80df10f845813 lishuo 2024-01-31  255  	ret = drm_dev_register(dev, 0);
b80df10f845813 lishuo 2024-01-31  256  	if (ret) {
b80df10f845813 lishuo 2024-01-31  257  		DRM_ERROR("failed to register drm dev\n");
b80df10f845813 lishuo 2024-01-31  258  		goto failed_register_drm;
b80df10f845813 lishuo 2024-01-31  259  	}
b80df10f845813 lishuo 2024-01-31  260  
b80df10f845813 lishuo 2024-01-31  261  	phytium_dp_hpd_irq_setup(dev, true);
b80df10f845813 lishuo 2024-01-31  262  
b80df10f845813 lishuo 2024-01-31  263  	return 0;
b80df10f845813 lishuo 2024-01-31  264  
b80df10f845813 lishuo 2024-01-31  265  failed_register_drm:
b80df10f845813 lishuo 2024-01-31  266  	phytium_pci_vram_fini(pdev, priv);
b80df10f845813 lishuo 2024-01-31  267  failed_pci_vram_init:
b80df10f845813 lishuo 2024-01-31  268  	phytium_pci_private_fini(pdev, priv);
b80df10f845813 lishuo 2024-01-31  269  failed_pci_private_init:
b80df10f845813 lishuo 2024-01-31  270  	if (pdev->msi_enabled)
b80df10f845813 lishuo 2024-01-31 @271  		pci_disable_msi(pdev);
b80df10f845813 lishuo 2024-01-31  272  	pci_disable_device(pdev);
b80df10f845813 lishuo 2024-01-31  273  failed_enable_device:
b80df10f845813 lishuo 2024-01-31  274  	pci_set_drvdata(pdev, NULL);
b80df10f845813 lishuo 2024-01-31  275  	drm_dev_put(dev);
b80df10f845813 lishuo 2024-01-31  276  
b80df10f845813 lishuo 2024-01-31  277  	return -1;
b80df10f845813 lishuo 2024-01-31  278  }
b80df10f845813 lishuo 2024-01-31  279  
:::::: The code at line 236 was first introduced by commit
:::::: b80df10f845813bb4fc2002b5386ecdfa8be5f6c DRM: Phytium display DRM driver
:::::: TO: lishuo <lishuo(a)phytium.com.cn>
:::::: CC: lishuo <lishuo(a)phytium.com.cn>
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:openEuler-1.0-LTS 1411/1411] sound/pci/rme32.o: warning: objtool: snd_rme32_playback_spdif_open()+0x2f0: can't find switch jump table
                        
                        
by kernel test robot 23 Jan '25
                    by kernel test robot 23 Jan '25
23 Jan '25
                    
                        tree:   https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head:   797ab005d487202cbf361ae3eae41cf56f289789
commit: 3ca17b1f3628f916f79e0ab62f1bf0e45ec9ba92 [1411/1411] lib/ubsan: remove null-pointer checks
config: x86_64-randconfig-101-20250122 (https://download.01.org/0day-ci/archive/20250123/202501230126.3VPcPXBh-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/20250123/202501230126.3VPcPXBh-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/202501230126.3VPcPXBh-lkp@intel.com/
All warnings (new ones prefixed by >>):
   sound/pci/rme32.c:896:2: warning: array index 0 is past the end of the array (that has type 'struct snd_kcontrol_volatile[0]') [-Warray-bounds]
     896 |         rme32->spdif_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
         |         ^                    ~
   include/sound/control.h:83:2: note: array 'vd' declared here
      83 |         struct snd_kcontrol_volatile vd[0];     /* volatile data */
         |         ^
   sound/pci/rme32.c:1020:3: warning: array index 0 is past the end of the array (that has type 'struct snd_kcontrol_volatile[0]') [-Warray-bounds]
    1020 |                 rme32->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE;
         |                 ^                    ~
   include/sound/control.h:83:2: note: array 'vd' declared here
      83 |         struct snd_kcontrol_volatile vd[0];     /* volatile data */
         |         ^
   2 warnings generated.
>> sound/pci/rme32.o: warning: objtool: snd_rme32_playback_spdif_open()+0x2f0: can't find switch jump table
--
>> sound/pci/ice1712/delta.o: warning: objtool: snd_cs8403_decode_spdif_bits()+0xa7: can't find switch jump table
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:OLK-5.10] BUILD SUCCESS 312a2590628d61c1d906019621f2a8ae38a4688c
                        
                        
by kernel test robot 23 Jan '25
                    by kernel test robot 23 Jan '25
23 Jan '25
                    
                        tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10
branch HEAD: 312a2590628d61c1d906019621f2a8ae38a4688c  !14414 sdma-dae: add print in exceptional branch
Warning ids grouped by kconfigs:
recent_errors
|-- arm64-allnoconfig
|   `-- include-linux-backing-dev.h:warning:struct-cgroup_subsys-declared-inside-parameter-list-will-not-be-visible-outside-of-this-definition-or-declaration
|-- x86_64-allnoconfig
|   |-- include-linux-backing-dev.h:warning:declaration-of-struct-cgroup_subsys-will-not-be-visible-outside-of-this-function
|   |-- include-linux-blk_types.h:linux-kabi.h-is-included-more-than-once.
|   |-- include-linux-cred.h:linux-kabi.h-is-included-more-than-once.
|   |-- include-linux-device-class.h:linux-kabi.h-is-included-more-than-once.
|   |-- include-linux-device.h:linux-kabi.h-is-included-more-than-once.
|   |-- include-linux-ioport.h:linux-kabi.h-is-included-more-than-once.
|   |-- include-linux-mm.h:linux-kabi.h-is-included-more-than-once.
|   |-- include-linux-swap.h:linux-kabi.h-is-included-more-than-once.
|   `-- samples-bpf-hbm.c:bpf-bpf.h-is-included-more-than-once.
|-- x86_64-allyesconfig
|   |-- crypto-af_alg.c:warning:Function-parameter-or-member-min-not-described-in-af_alg_wait_for_data
|   |-- crypto-asymmetric_keys-pgp_library.c:warning:Excess-function-parameter-_data-description-in-pgp_parse_packets
|   |-- crypto-asymmetric_keys-pgp_library.c:warning:Excess-function-parameter-_datalen-description-in-pgp_parse_packets
|   |-- crypto-asymmetric_keys-pgp_library.c:warning:Function-parameter-or-member-data-not-described-in-pgp_parse_packets
|   |-- crypto-asymmetric_keys-pgp_library.c:warning:Function-parameter-or-member-datalen-not-described-in-pgp_parse_packets
|   |-- fs-cachefiles-rdwr.c:warning:no-previous-prototype-for-function-cachefiles_readpages_work_func
|   `-- fs-cachefiles-xattr.c:warning:no-previous-prototype-for-function-cachefiles_check_old_object_xattr
|-- x86_64-buildonly-randconfig-001-20250122
|   |-- block-genhd.c:warning:d-directive-output-may-be-truncated-writing-between-and-bytes-into-a-region-of-size-between-and
|   |-- block-genhd.c:warning:snprintf-output-may-be-truncated-before-the-last-format-character
|   `-- crypto-af_alg.c:warning:Function-parameter-or-member-min-not-described-in-af_alg_wait_for_data
|-- x86_64-buildonly-randconfig-002-20250122
|   `-- include-linux-backing-dev.h:warning:declaration-of-struct-cgroup_subsys-will-not-be-visible-outside-of-this-function
|-- x86_64-buildonly-randconfig-003-20250122
|   `-- include-linux-lsm_hook_defs.h:warning:file_ioctl_compat_default-defined-but-not-used
|-- x86_64-buildonly-randconfig-004-20250122
|   |-- block-genhd.c:warning:d-directive-output-may-be-truncated-writing-between-and-bytes-into-a-region-of-size-between-and
|   |-- block-genhd.c:warning:snprintf-output-may-be-truncated-before-the-last-format-character
|   |-- crypto-af_alg.c:warning:Function-parameter-or-member-min-not-described-in-af_alg_wait_for_data
|   |-- fs-cachefiles-ondemand.c:warning:implicit-conversion-from-enum-cachefiles_obj_ref_trace-to-enum-fscache_obj_ref_trace
|   |-- fs-cachefiles-rdwr.c:warning:no-previous-prototype-for-cachefiles_readpages_work_func
|   |-- fs-cachefiles-xattr.c:warning:no-previous-prototype-for-cachefiles_check_old_object_xattr
|   `-- include-linux-backing-dev.h:warning:struct-cgroup_subsys-declared-inside-parameter-list-will-not-be-visible-outside-of-this-definition-or-declaration
|-- x86_64-buildonly-randconfig-005-20250122
|   |-- crypto-af_alg.c:warning:Function-parameter-or-member-min-not-described-in-af_alg_wait_for_data
|   `-- include-linux-minmax.h:warning:comparison-of-distinct-pointer-types-lacks-a-cast
|-- x86_64-buildonly-randconfig-006-20250122
|   |-- fs-cachefiles-rdwr.c:warning:no-previous-prototype-for-function-cachefiles_readpages_work_func
|   `-- fs-cachefiles-xattr.c:warning:no-previous-prototype-for-function-cachefiles_check_old_object_xattr
`-- x86_64-defconfig
    `-- include-linux-lsm_hook_defs.h:warning:file_ioctl_compat_default-defined-but-not-used
elapsed time: 723m
configs tested: 15
configs skipped: 128
The following configs have been built successfully.
More configs may be tested in the coming days.
tested configs:
arm64                        allmodconfig    clang-18
arm64                         allnoconfig    gcc-14.2.0
arm64             randconfig-001-20250122    clang-20
arm64             randconfig-002-20250122    clang-15
arm64             randconfig-003-20250122    clang-20
arm64             randconfig-004-20250122    clang-19
x86_64                        allnoconfig    clang-19
x86_64                       allyesconfig    clang-19
x86_64  buildonly-randconfig-001-20250122    gcc-12
x86_64  buildonly-randconfig-002-20250122    clang-19
x86_64  buildonly-randconfig-003-20250122    gcc-12
x86_64  buildonly-randconfig-004-20250122    gcc-12
x86_64  buildonly-randconfig-005-20250122    gcc-12
x86_64  buildonly-randconfig-006-20250122    clang-19
x86_64                          defconfig    gcc-11
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:OLK-6.6 1834/1834] drivers/net/ethernet/yunsilicon/xsc/net/main.c:2610:5: warning: no previous prototype for 'xsc_set_vf_link_state'
                        
                        
by kernel test robot 22 Jan '25
                    by kernel test robot 22 Jan '25
22 Jan '25
                    
                        tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   75c81bcddd82381fbd4cef477a5b56eb2fe56697
commit: bcfb3e65a5707ca4caf593a33276f26b993ad71e [1834/1834] drivers: update Yunsilicon driver to version 2406_rc16
config: x86_64-randconfig-121-20250122 (https://download.01.org/0day-ci/archive/20250122/202501222120.JRNKhp0f-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250122/202501222120.JRNKhp0f-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/202501222120.JRNKhp0f-lkp@intel.com/
All warnings (new ones prefixed by >>):
         |      ^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:201:6: warning: no previous prototype for 'xsc_eth_cq_error_event' [-Wmissing-prototypes]
     201 | void xsc_eth_cq_error_event(struct xsc_core_cq *xcq, enum xsc_event event)
         |      ^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:215:6: warning: no previous prototype for 'xsc_eth_completion_event' [-Wmissing-prototypes]
     215 | void xsc_eth_completion_event(struct xsc_core_cq *xcq)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:262:5: warning: no previous prototype for 'xsc_eth_create_cq' [-Wmissing-prototypes]
     262 | int xsc_eth_create_cq(struct xsc_core_device *xdev, struct xsc_core_cq *xcq,
         |     ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:297:5: warning: no previous prototype for 'xsc_eth_destroy_cq' [-Wmissing-prototypes]
     297 | int xsc_eth_destroy_cq(struct xsc_core_device *xdev, struct xsc_cq *cq)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:335:6: warning: no previous prototype for 'xsc_eth_free_cq' [-Wmissing-prototypes]
     335 | void xsc_eth_free_cq(struct xsc_cq *cq)
         |      ^~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:340:5: warning: no previous prototype for 'xsc_eth_create_rss_qp_rqs' [-Wmissing-prototypes]
     340 | int xsc_eth_create_rss_qp_rqs(struct xsc_core_device *xdev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:361:6: warning: no previous prototype for 'xsc_eth_qp_event' [-Wmissing-prototypes]
     361 | void xsc_eth_qp_event(struct xsc_core_qp *qp, int type)
         |      ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:391:5: warning: no previous prototype for 'xsc_eth_create_qp_rq' [-Wmissing-prototypes]
     391 | int xsc_eth_create_qp_rq(struct xsc_core_device *xdev, struct xsc_rq *prq,
         |     ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:418:5: warning: no previous prototype for 'xsc_eth_destroy_qp_rq' [-Wmissing-prototypes]
     418 | int xsc_eth_destroy_qp_rq(struct xsc_core_device *xdev, struct xsc_rq *prq)
         |     ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:470:5: warning: no previous prototype for 'xsc_eth_create_qp_sq' [-Wmissing-prototypes]
     470 | int xsc_eth_create_qp_sq(struct xsc_core_device *xdev, struct xsc_sq *psq,
         |     ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:489:5: warning: no previous prototype for 'xsc_eth_modify_qp_sq' [-Wmissing-prototypes]
     489 | int xsc_eth_modify_qp_sq(struct xsc_core_device *xdev, struct xsc_modify_raw_qp_mbox_in *in)
         |     ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:507:5: warning: no previous prototype for 'xsc_eth_destroy_qp_sq' [-Wmissing-prototypes]
     507 | int xsc_eth_destroy_qp_sq(struct xsc_core_device *xdev, struct xsc_sq *psq)
         |     ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:735:5: warning: no previous prototype for 'xsc_eth_set_hw_mtu' [-Wmissing-prototypes]
     735 | int xsc_eth_set_hw_mtu(struct xsc_core_device *dev, u16 mtu, u16 rx_buf_sz)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:760:5: warning: no previous prototype for 'xsc_eth_get_mac' [-Wmissing-prototypes]
     760 | int xsc_eth_get_mac(struct xsc_core_device *dev, char *mac)
         |     ^~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:790:5: warning: no previous prototype for 'xsc_eth_modify_qps_channel' [-Wmissing-prototypes]
     790 | int xsc_eth_modify_qps_channel(struct xsc_adapter *adapter, struct xsc_channel *c)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:812:5: warning: no previous prototype for 'xsc_eth_modify_qps' [-Wmissing-prototypes]
     812 | int xsc_eth_modify_qps(struct xsc_adapter *adapter,
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:829:5: warning: no previous prototype for 'xsc_rx_get_linear_frag_sz' [-Wmissing-prototypes]
     829 | u32 xsc_rx_get_linear_frag_sz(u32 mtu)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:836:6: warning: no previous prototype for 'xsc_rx_is_linear_skb' [-Wmissing-prototypes]
     836 | bool xsc_rx_is_linear_skb(u32 mtu)
         |      ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1313:5: warning: no previous prototype for 'xsc_eth_open_channel' [-Wmissing-prototypes]
    1313 | int xsc_eth_open_channel(struct xsc_adapter *adapter,
         |     ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1526:5: warning: no previous prototype for 'xsc_eth_open_channels' [-Wmissing-prototypes]
    1526 | int xsc_eth_open_channels(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1638:6: warning: no previous prototype for 'xsc_eth_activate_channel' [-Wmissing-prototypes]
    1638 | void xsc_eth_activate_channel(struct xsc_channel *c)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1644:6: warning: no previous prototype for 'xsc_eth_deactivate_channel' [-Wmissing-prototypes]
    1644 | void xsc_eth_deactivate_channel(struct xsc_channel *c)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1690:6: warning: no previous prototype for 'xsc_eth_activate_priv_channels' [-Wmissing-prototypes]
    1690 | void xsc_eth_activate_priv_channels(struct xsc_adapter *adapter)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1705:6: warning: no previous prototype for 'xsc_eth_deactivate_priv_channels' [-Wmissing-prototypes]
    1705 | void xsc_eth_deactivate_priv_channels(struct xsc_adapter *adapter)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1864:5: warning: no previous prototype for 'xsc_eth_change_link_status' [-Wmissing-prototypes]
    1864 | int xsc_eth_change_link_status(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1927:6: warning: no previous prototype for 'xsc_eth_event_handler' [-Wmissing-prototypes]
    1927 | void xsc_eth_event_handler(void *arg)
         |      ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1935:5: warning: no previous prototype for 'xsc_eth_enable_nic_hca' [-Wmissing-prototypes]
    1935 | int xsc_eth_enable_nic_hca(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1999:5: warning: no previous prototype for 'xsc_eth_disable_nic_hca' [-Wmissing-prototypes]
    1999 | int xsc_eth_disable_nic_hca(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2029:6: warning: no previous prototype for 'xsc_eth_rss_params_change' [-Wmissing-prototypes]
    2029 | void xsc_eth_rss_params_change(struct xsc_adapter *adapter, u32 change, void *modify)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2357:6: warning: no previous prototype for 'xsc_build_default_indir_rqt' [-Wmissing-prototypes]
    2357 | void xsc_build_default_indir_rqt(u32 *indirection_rqt, int len,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2455:5: warning: no previous prototype for 'xsc_eth_nic_mtu_changed' [-Wmissing-prototypes]
    2455 | int xsc_eth_nic_mtu_changed(struct xsc_adapter *priv)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2525:5: warning: no previous prototype for 'xsc_set_vf_mac' [-Wmissing-prototypes]
    2525 | int xsc_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
         |     ^~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2593:5: warning: no previous prototype for 'xsc_get_vf_config' [-Wmissing-prototypes]
    2593 | int xsc_get_vf_config(struct net_device *dev,
         |     ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:2610:5: warning: no previous prototype for 'xsc_set_vf_link_state' [-Wmissing-prototypes]
    2610 | int xsc_set_vf_link_state(struct net_device *dev, int vf,
         |     ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2620:5: warning: no previous prototype for 'set_feature_rxcsum' [-Wmissing-prototypes]
    2620 | int set_feature_rxcsum(struct net_device *netdev, bool enable)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:2642:5: warning: no previous prototype for 'set_feature_vlan_offload' [-Wmissing-prototypes]
    2642 | int set_feature_vlan_offload(struct net_device *netdev, bool enable)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2694:5: warning: no previous prototype for 'xsc_eth_set_features' [-Wmissing-prototypes]
    2694 | int xsc_eth_set_features(struct net_device *netdev, netdev_features_t features)
         |     ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2757:5: warning: no previous prototype for 'xsc_select_queue' [-Wmissing-prototypes]
    2757 | u16 xsc_select_queue(struct net_device *dev, struct sk_buff *skb,
         |     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c: In function 'xsc_get_phys_port_name':
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2805:28: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
    2805 |                 if (!pdev->physfn)
         |                            ^~~~~~
         |                            is_physfn
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2807:49: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
    2807 |                 pf_xdev = pci_get_drvdata(pdev->physfn);
         |                                                 ^~~~~~
         |                                                 is_physfn
   drivers/net/ethernet/yunsilicon/xsc/net/main.c: At top level:
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2966:24: warning: no previous prototype for 'xsc_tirc_get_default_config' [-Wmissing-prototypes]
    2966 | struct xsc_tirc_config xsc_tirc_get_default_config(enum xsc_traffic_types tt)
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2971:6: warning: no previous prototype for 'xsc_build_rss_params' [-Wmissing-prototypes]
    2971 | void xsc_build_rss_params(struct xsc_rss_params *rss_params, u16 num_channels)
         |      ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2989:6: warning: no previous prototype for 'xsc_eth_build_nic_params' [-Wmissing-prototypes]
    2989 | void xsc_eth_build_nic_params(struct xsc_adapter *adapter, u32 ch_num, u32 tc_num)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:3017:6: warning: no previous prototype for 'xsc_eth_build_nic_netdev' [-Wmissing-prototypes]
    3017 | void xsc_eth_build_nic_netdev(struct xsc_adapter *adapter)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:3085:5: warning: no previous prototype for 'xsc_eth_create_xdev_resources' [-Wmissing-prototypes]
    3085 | int xsc_eth_create_xdev_resources(struct xsc_core_device *xdev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:3106:5: warning: no previous prototype for 'xsc_eth_init_nic_rx' [-Wmissing-prototypes]
    3106 | int xsc_eth_init_nic_rx(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:3343:5: warning: no previous prototype for 'xsc_net_reboot_event_handler' [-Wmissing-prototypes]
    3343 | int xsc_net_reboot_event_handler(struct notifier_block *nb, unsigned long action, void *data)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:182:5: warning: no previous prototype for 'xsc_priv_flags_num' [-Wmissing-prototypes]
     182 | int xsc_priv_flags_num(void)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:187:13: warning: no previous prototype for 'xsc_priv_flags_name' [-Wmissing-prototypes]
     187 | const char *xsc_priv_flags_name(int flag)
         |             ^~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:213:5: warning: no previous prototype for 'xsc_set_priv_flags' [-Wmissing-prototypes]
     213 | int xsc_set_priv_flags(struct net_device *dev, u32 pflags)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:369:5: warning: no previous prototype for 'xsc_get_priv_flags' [-Wmissing-prototypes]
     369 | u32 xsc_get_priv_flags(struct net_device *dev)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:849:5: warning: no previous prototype for 'xsc_get_rxnfc' [-Wmissing-prototypes]
     849 | int xsc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
         |     ^~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:872:5: warning: no previous prototype for 'xsc_set_rxnfc' [-Wmissing-prototypes]
     872 | int xsc_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
         |     ^~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:901:5: warning: no previous prototype for 'xsc_get_rxfh' [-Wmissing-prototypes]
     901 | int xsc_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, u8 *hfunc)
         |     ^~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:920:5: warning: no previous prototype for 'xsc_set_rxfh' [-Wmissing-prototypes]
     920 | int xsc_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, const u8 hfunc)
         |     ^~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:31:27: warning: 'pct_exp_name' defined but not used [-Wunused-const-variable=]
      31 | static const char * const pct_exp_name[] = {"N", "E" };
         |                           ^~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:30:27: warning: 'pp_tbl_dma_name' defined but not used [-Wunused-const-variable=]
      30 | static const char * const pp_tbl_dma_name[] = {"N", "D" };
         |                           ^~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:29:27: warning: 'anlt_fec_name' defined but not used [-Wunused-const-variable=]
      29 | static const char * const anlt_fec_name[] = {"N", "A" };
         |                           ^~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:28:27: warning: 'ma_xbar_name' defined but not used [-Wunused-const-variable=]
      28 | static const char * const ma_xbar_name[] = {"N", "X" };
         |                           ^~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:27:27: warning: 'rdma_icrc_name' defined but not used [-Wunused-const-variable=]
      27 | static const char * const rdma_icrc_name[] = {"N", "C" };
         |                           ^~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:26:27: warning: 'onchip_ft_name' defined but not used [-Wunused-const-variable=]
      26 | static const char * const onchip_ft_name[] = {"N", "O" };
         |                           ^~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:25:27: warning: 'hps_ddr_name' defined but not used [-Wunused-const-variable=]
      25 | static const char * const hps_ddr_name[] = {"1", "2", "4", "unknown"};
         |                           ^~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:24:27: warning: 'fpga_type_name' defined but not used [-Wunused-const-variable=]
      24 | static const char * const fpga_type_name[] = {"S", "L"};
         |                           ^~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_hw_comm.c: In function 'xsc_dcbx_hw_qos_cmdq':
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_hw_comm.c:47:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
      47 |         int err;
         |             ^~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_hw_comm.c: At top level:
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_hw_comm.c:104:5: warning: no previous prototype for 'xsc_hw_kernel_call' [-Wmissing-prototypes]
     104 | int xsc_hw_kernel_call(struct xsc_core_device *xdev, u16 opcode, void *req, void *rsp)
         |     ^~~~~~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:174:5: warning: no previous prototype for 'xsc_priv_init' [-Wmissing-prototypes]
     174 | int xsc_priv_init(struct xsc_core_device *dev)
         |     ^~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:188:5: warning: no previous prototype for 'xsc_dev_res_init' [-Wmissing-prototypes]
     188 | int xsc_dev_res_init(struct xsc_core_device *dev)
         |     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:207:6: warning: no previous prototype for 'xsc_dev_res_cleanup' [-Wmissing-prototypes]
     207 | void xsc_dev_res_cleanup(struct xsc_core_device *dev)
         |      ^~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:213:6: warning: no previous prototype for 'xsc_init_reg_addr' [-Wmissing-prototypes]
     213 | void xsc_init_reg_addr(struct xsc_core_device *dev)
         |      ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:400:5: warning: no previous prototype for 'xsc_reset_function_resource' [-Wmissing-prototypes]
     400 | int xsc_reset_function_resource(struct xsc_core_device *dev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:635:5: warning: no previous prototype for 'xsc_load_one' [-Wmissing-prototypes]
     635 | int xsc_load_one(struct xsc_core_device *dev, bool boot)
         |     ^~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c: In function 'xsc_load_one':
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:665:74: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
     665 |         if (!dev->reg_mr_via_cmdq && (xsc_core_is_pf(dev) || !dev->pdev->physfn)) {
         |                                                                          ^~~~~~
         |                                                                          is_physfn
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:711:74: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
     711 |         if (!dev->reg_mr_via_cmdq && (xsc_core_is_pf(dev) || !dev->pdev->physfn))
         |                                                                          ^~~~~~
         |                                                                          is_physfn
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c: At top level:
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:726:5: warning: no previous prototype for 'xsc_unload_one' [-Wmissing-prototypes]
     726 | int xsc_unload_one(struct xsc_core_device *dev, bool cleanup)
         |     ^~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c: In function 'xsc_unload_one':
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:748:74: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
     748 |         if (!dev->reg_mr_via_cmdq && (xsc_core_is_pf(dev) || !dev->pdev->physfn))
         |                                                                          ^~~~~~
         |                                                                          is_physfn
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c: At top level:
>> drivers/net/ethernet/yunsilicon/xsc/pci/main.c:856:5: warning: no previous prototype for 'xsc_pci_reboot_event_handler' [-Wmissing-prototypes]
     856 | int xsc_pci_reboot_event_handler(struct notifier_block *nb, unsigned long action, void *data)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
>> drivers/net/ethernet/yunsilicon/xsc/pci/mr.c:71:5: warning: no previous prototype for 'xsc_set_mpt_via_cmdq' [-Wmissing-prototypes]
      71 | int xsc_set_mpt_via_cmdq(struct xsc_core_device *dev, struct xsc_register_mr_mbox_in *in_cmd,
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/mr.c:106:5: warning: no previous prototype for 'xsc_set_mtt_via_cmdq' [-Wmissing-prototypes]
     106 | int xsc_set_mtt_via_cmdq(struct xsc_core_device *dev, struct xsc_register_mr_mbox_in *in_cmd,
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/mr.c:153:5: warning: no previous prototype for 'xsc_dereg_mr_via_cmdq' [-Wmissing-prototypes]
     153 | int xsc_dereg_mr_via_cmdq(struct xsc_core_device *dev,  struct xsc_register_mr_mbox_in *in_cmd)
         |     ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/mr.c:170:5: warning: no previous prototype for 'xsc_reg_mr_via_cmdq' [-Wmissing-prototypes]
     170 | int xsc_reg_mr_via_cmdq(struct xsc_core_device *dev, struct xsc_register_mr_mbox_in *in)
         |     ^~~~~~~~~~~~~~~~~~~
--
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:29:6: warning: no previous prototype for 'xsc_board_lag_set' [-Wmissing-prototypes]
      29 | void xsc_board_lag_set(struct xsc_core_device *xdev,
         |      ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:38:6: warning: no previous prototype for 'xsc_board_lag_reset' [-Wmissing-prototypes]
      38 | void xsc_board_lag_reset(u32 board_id)
         |      ^~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:75:22: warning: no previous prototype for 'bond_lag_hash_type' [-Wmissing-prototypes]
      75 | enum netdev_lag_hash bond_lag_hash_type(struct bonding *bond)
         |                      ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:123:5: warning: no previous prototype for 'xsc_cmd_create_lag' [-Wmissing-prototypes]
     123 | int xsc_cmd_create_lag(struct xsc_lag_event *entry)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:155:5: warning: no previous prototype for 'xsc_cmd_add_lag_member' [-Wmissing-prototypes]
     155 | int xsc_cmd_add_lag_member(struct xsc_lag_event *entry)
         |     ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:188:5: warning: no previous prototype for 'xsc_cmd_remove_lag_member' [-Wmissing-prototypes]
     188 | int xsc_cmd_remove_lag_member(struct xsc_lag_event *entry)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:220:5: warning: no previous prototype for 'xsc_cmd_update_lag_member_status' [-Wmissing-prototypes]
     220 | int xsc_cmd_update_lag_member_status(struct xsc_lag_event *entry)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:249:5: warning: no previous prototype for 'xsc_cmd_update_lag_hash_type' [-Wmissing-prototypes]
     249 | int xsc_cmd_update_lag_hash_type(struct xsc_lag_event *entry)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:274:5: warning: no previous prototype for 'xsc_cmd_destroy_lag' [-Wmissing-prototypes]
     274 | int xsc_cmd_destroy_lag(struct xsc_lag_event *entry)
         |     ^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:320:6: warning: no previous prototype for 'xsc_create_lag' [-Wmissing-prototypes]
     320 | void xsc_create_lag(struct xsc_lag_event *entry)
         |      ^~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:351:6: warning: no previous prototype for 'xsc_add_lag_member' [-Wmissing-prototypes]
     351 | void xsc_add_lag_member(struct xsc_lag_event *entry)
         |      ^~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:379:6: warning: no previous prototype for 'xsc_remove_lag_member' [-Wmissing-prototypes]
     379 | void xsc_remove_lag_member(struct xsc_lag_event *entry)
         |      ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:414:6: warning: no previous prototype for 'xsc_update_lag_member_status' [-Wmissing-prototypes]
     414 | void xsc_update_lag_member_status(struct xsc_lag_event *entry)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:434:6: warning: no previous prototype for 'xsc_update_lag_hash_type' [-Wmissing-prototypes]
     434 | void xsc_update_lag_hash_type(struct xsc_lag_event *entry)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:444:6: warning: no previous prototype for 'xsc_destroy_lag' [-Wmissing-prototypes]
     444 | void xsc_destroy_lag(struct xsc_lag_event *entry)
         |      ^~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:605:6: warning: no previous prototype for 'pack_lag_create' [-Wmissing-prototypes]
     605 | void pack_lag_create(struct xsc_lag *lag,
         |      ^~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:638:6: warning: no previous prototype for 'pack_lag_add_member' [-Wmissing-prototypes]
     638 | void pack_lag_add_member(struct xsc_lag *lag,
         |      ^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:683:6: warning: no previous prototype for 'pack_lag_remove_member' [-Wmissing-prototypes]
     683 | void pack_lag_remove_member(struct xsc_lag *lag,
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:738:6: warning: no previous prototype for 'pack_lag_update_member_status' [-Wmissing-prototypes]
     738 | void pack_lag_update_member_status(struct xsc_lag *lag,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:766:6: warning: no previous prototype for 'pack_lag_update_hash_type' [-Wmissing-prototypes]
     766 | void pack_lag_update_hash_type(struct xsc_lag *lag,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:796:6: warning: no previous prototype for 'pack_lag_destroy' [-Wmissing-prototypes]
     796 | void pack_lag_destroy(struct xsc_lag *lag, struct xsc_core_device *xdev, bool no_wq)
         |      ^~~~~~~~~~~~~~~~
vim +/xsc_set_vf_link_state +2610 drivers/net/ethernet/yunsilicon/xsc/net/main.c
  2609	
> 2610	int xsc_set_vf_link_state(struct net_device *dev, int vf,
  2611				  int link_state)
  2612	{
  2613		struct xsc_adapter *adapter = netdev_priv(dev);
  2614		struct xsc_core_device *xdev = adapter->xdev;
  2615		struct xsc_eswitch *esw = xdev->priv.eswitch;
  2616	
  2617		return xsc_eswitch_set_vport_state(esw, vf + 1, link_state);
  2618	}
  2619	
  2620	int set_feature_rxcsum(struct net_device *netdev, bool enable)
  2621	{
  2622		struct xsc_adapter *adapter = netdev_priv(netdev);
  2623		struct xsc_core_device *xdev = adapter->xdev;
  2624		struct xsc_cmd_modify_nic_hca_mbox_in in = {};
  2625		struct xsc_cmd_modify_nic_hca_mbox_out out = {};
  2626		int err;
  2627	
  2628		in.hdr.opcode = cpu_to_be16(XSC_CMD_OP_MODIFY_NIC_HCA);
  2629		in.nic.caps_mask = cpu_to_be16(BIT(XSC_TBM_CAP_HASH_PPH));
  2630		in.nic.caps = cpu_to_be16(enable << XSC_TBM_CAP_HASH_PPH);
  2631	
  2632		err = xsc_cmd_exec(xdev, &in, sizeof(in), &out, sizeof(out));
  2633		if (err || out.hdr.status) {
  2634			netdev_err(netdev, "failed to change rxcsum=%d, err=%d, status=%d\n",
  2635				   enable, err, out.hdr.status);
  2636			return -ENOEXEC;
  2637		}
  2638	
  2639		return 0;
  2640	}
  2641	
> 2642	int set_feature_vlan_offload(struct net_device *netdev, bool enable)
  2643	{
  2644		int err = 0, i;
  2645		struct xsc_adapter *adapter = netdev_priv(netdev);
  2646		struct xsc_vport *evport = NULL;
  2647	
  2648		if (!enable) {
  2649			for (i = 0; i < adapter->xdev->priv.eswitch->num_vfs; i++) {
  2650				evport = xsc_eswitch_get_vport(adapter->xdev->priv.eswitch,
  2651							       i + 1);
  2652				if (evport && (evport->vlan_id || evport->vlan_qos)) {
  2653					evport->vlan_id = 0;
  2654					evport->vlan_qos = 0;
  2655					err = xsc_eswitch_set_vport_vlan(adapter->xdev->priv.eswitch,
  2656									 i + 1, evport->vlan_id,
  2657									 evport->vlan_qos,
  2658									 evport->vlan_proto);
  2659					if (err)
  2660						xsc_core_err(adapter->xdev, "fail to clear vf vlan offload vf=%d err=%d\n",
  2661							     i, err);
  2662				}
  2663			}
  2664		}
  2665	
  2666		return 0;
  2667	}
  2668	
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:OLK-6.6 1834/1834] drivers/net/ethernet/yunsilicon/xsc/net/main.c:197:6: warning: no previous prototype for 'xsc_eth_cq_error_event'
                        
                        
by kernel test robot 22 Jan '25
                    by kernel test robot 22 Jan '25
22 Jan '25
                    
                        tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   75c81bcddd82381fbd4cef477a5b56eb2fe56697
commit: 601fb01dc16f747534b866610743d95830b6655e [1834/1834] drivers: support for xsc drivers from Yunsilicon Technology
config: x86_64-randconfig-121-20250122 (https://download.01.org/0day-ci/archive/20250122/202501221955.lCr3eThq-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250122/202501221955.lCr3eThq-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/202501221955.lCr3eThq-lkp@intel.com/
All warnings (new ones prefixed by >>):
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:166:5: warning: no previous prototype for 'xsc_rx_alloc_page_cache' [-Wmissing-prototypes]
     166 | int xsc_rx_alloc_page_cache(struct xsc_rq *rq, int node, u8 log_init_sz)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:179:6: warning: no previous prototype for 'xsc_rx_free_page_cache' [-Wmissing-prototypes]
     179 | void xsc_rx_free_page_cache(struct xsc_rq *rq)
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:197:6: warning: no previous prototype for 'xsc_eth_cq_error_event' [-Wmissing-prototypes]
     197 | void xsc_eth_cq_error_event(struct xsc_core_cq *xcq, enum xsc_event event)
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:211:6: warning: no previous prototype for 'xsc_eth_completion_event' [-Wmissing-prototypes]
     211 | void xsc_eth_completion_event(struct xsc_core_cq *xcq)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:260:5: warning: no previous prototype for 'xsc_eth_create_cq' [-Wmissing-prototypes]
     260 | int xsc_eth_create_cq(struct xsc_core_device *xdev, struct xsc_core_cq *xcq,
         |     ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:295:5: warning: no previous prototype for 'xsc_eth_destroy_cq' [-Wmissing-prototypes]
     295 | int xsc_eth_destroy_cq(struct xsc_core_device *xdev, struct xsc_cq *cq)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:333:6: warning: no previous prototype for 'xsc_eth_free_cq' [-Wmissing-prototypes]
     333 | void xsc_eth_free_cq(struct xsc_cq *cq)
         |      ^~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:338:5: warning: no previous prototype for 'xsc_eth_create_rss_qp_rqs' [-Wmissing-prototypes]
     338 | int xsc_eth_create_rss_qp_rqs(struct xsc_core_device *xdev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:359:6: warning: no previous prototype for 'xsc_eth_qp_event' [-Wmissing-prototypes]
     359 | void xsc_eth_qp_event(struct xsc_core_qp *qp, int type)
         |      ^~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:389:5: warning: no previous prototype for 'xsc_eth_create_qp_rq' [-Wmissing-prototypes]
     389 | int xsc_eth_create_qp_rq(struct xsc_core_device *xdev, struct xsc_rq *prq,
         |     ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:416:5: warning: no previous prototype for 'xsc_eth_destroy_qp_rq' [-Wmissing-prototypes]
     416 | int xsc_eth_destroy_qp_rq(struct xsc_core_device *xdev, struct xsc_rq *prq)
         |     ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:469:5: warning: no previous prototype for 'xsc_eth_create_qp_sq' [-Wmissing-prototypes]
     469 | int xsc_eth_create_qp_sq(struct xsc_core_device *xdev, struct xsc_sq *psq,
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:488:5: warning: no previous prototype for 'xsc_eth_modify_qp_sq' [-Wmissing-prototypes]
     488 | int xsc_eth_modify_qp_sq(struct xsc_core_device *xdev, struct xsc_modify_raw_qp_mbox_in *in)
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:506:5: warning: no previous prototype for 'xsc_eth_destroy_qp_sq' [-Wmissing-prototypes]
     506 | int xsc_eth_destroy_qp_sq(struct xsc_core_device *xdev, struct xsc_sq *psq)
         |     ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:750:5: warning: no previous prototype for 'xsc_eth_set_hw_mtu' [-Wmissing-prototypes]
     750 | int xsc_eth_set_hw_mtu(struct xsc_core_device *dev, u16 mtu, u16 rx_buf_sz)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:775:5: warning: no previous prototype for 'xsc_eth_get_mac' [-Wmissing-prototypes]
     775 | int xsc_eth_get_mac(struct xsc_core_device *dev, char *mac)
         |     ^~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:806:5: warning: no previous prototype for 'xsc_eth_modify_qps_channel' [-Wmissing-prototypes]
     806 | int xsc_eth_modify_qps_channel(struct xsc_adapter *adapter, struct xsc_channel *c)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:828:5: warning: no previous prototype for 'xsc_eth_modify_qps' [-Wmissing-prototypes]
     828 | int xsc_eth_modify_qps(struct xsc_adapter *adapter,
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:845:5: warning: no previous prototype for 'xsc_rx_get_linear_frag_sz' [-Wmissing-prototypes]
     845 | u32 xsc_rx_get_linear_frag_sz(u32 mtu)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:852:6: warning: no previous prototype for 'xsc_rx_is_linear_skb' [-Wmissing-prototypes]
     852 | bool xsc_rx_is_linear_skb(u32 mtu)
         |      ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:1316:5: warning: no previous prototype for 'xsc_eth_open_channel' [-Wmissing-prototypes]
    1316 | int xsc_eth_open_channel(struct xsc_adapter *adapter,
         |     ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1528:5: warning: no previous prototype for 'xsc_eth_open_channels' [-Wmissing-prototypes]
    1528 | int xsc_eth_open_channels(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:1640:6: warning: no previous prototype for 'xsc_eth_activate_channel' [-Wmissing-prototypes]
    1640 | void xsc_eth_activate_channel(struct xsc_channel *c)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1646:6: warning: no previous prototype for 'xsc_eth_deactivate_channel' [-Wmissing-prototypes]
    1646 | void xsc_eth_deactivate_channel(struct xsc_channel *c)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1692:6: warning: no previous prototype for 'xsc_eth_activate_priv_channels' [-Wmissing-prototypes]
    1692 | void xsc_eth_activate_priv_channels(struct xsc_adapter *adapter)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1707:6: warning: no previous prototype for 'xsc_eth_deactivate_priv_channels' [-Wmissing-prototypes]
    1707 | void xsc_eth_deactivate_priv_channels(struct xsc_adapter *adapter)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1850:5: warning: no previous prototype for 'xsc_eth_change_link_status' [-Wmissing-prototypes]
    1850 | int xsc_eth_change_link_status(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1907:6: warning: no previous prototype for 'xsc_eth_event_handler' [-Wmissing-prototypes]
    1907 | void xsc_eth_event_handler(void *arg)
         |      ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:1915:5: warning: no previous prototype for 'xsc_eth_enable_nic_hca' [-Wmissing-prototypes]
    1915 | int xsc_eth_enable_nic_hca(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:1977:5: warning: no previous prototype for 'xsc_eth_disable_nic_hca' [-Wmissing-prototypes]
    1977 | int xsc_eth_disable_nic_hca(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2010:6: warning: no previous prototype for 'xsc_eth_rss_params_change' [-Wmissing-prototypes]
    2010 | void xsc_eth_rss_params_change(struct xsc_adapter *adapter, u32 change, void *modify)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:2318:6: warning: no previous prototype for 'xsc_build_default_indir_rqt' [-Wmissing-prototypes]
    2318 | void xsc_build_default_indir_rqt(u32 *indirection_rqt, int len,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:2416:5: warning: no previous prototype for 'xsc_eth_nic_mtu_changed' [-Wmissing-prototypes]
    2416 | int xsc_eth_nic_mtu_changed(struct xsc_adapter *priv)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2479:5: warning: no previous prototype for 'xsc_set_vf_mac' [-Wmissing-prototypes]
    2479 | int xsc_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
         |     ^~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2496:5: warning: no previous prototype for 'xsc_get_vf_config' [-Wmissing-prototypes]
    2496 | int xsc_get_vf_config(struct net_device *dev,
         |     ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2512:5: warning: no previous prototype for 'set_feature_rxcsum' [-Wmissing-prototypes]
    2512 | int set_feature_rxcsum(struct net_device *netdev, bool enable)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2564:5: warning: no previous prototype for 'xsc_eth_set_features' [-Wmissing-prototypes]
    2564 | int xsc_eth_set_features(struct net_device *netdev, netdev_features_t features)
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:2581:5: warning: no previous prototype for 'xsc_select_queue' [-Wmissing-prototypes]
    2581 | u16 xsc_select_queue(struct net_device *dev, struct sk_buff *skb,
         |     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c: In function 'xsc_get_phys_port_name':
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2628:28: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
    2628 |                 if (!pdev->physfn)
         |                            ^~~~~~
         |                            is_physfn
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2630:49: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
    2630 |                 pf_xdev = pci_get_drvdata(pdev->physfn);
         |                                                 ^~~~~~
         |                                                 is_physfn
   drivers/net/ethernet/yunsilicon/xsc/net/main.c: At top level:
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2769:24: warning: no previous prototype for 'xsc_tirc_get_default_config' [-Wmissing-prototypes]
    2769 | struct xsc_tirc_config xsc_tirc_get_default_config(enum xsc_traffic_types tt)
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2774:6: warning: no previous prototype for 'xsc_build_rss_params' [-Wmissing-prototypes]
    2774 | void xsc_build_rss_params(struct xsc_rss_params *rss_params, u16 num_channels)
         |      ^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2792:6: warning: no previous prototype for 'xsc_eth_build_nic_params' [-Wmissing-prototypes]
    2792 | void xsc_eth_build_nic_params(struct xsc_adapter *adapter, u32 ch_num, u32 tc_num)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/main.c:2814:6: warning: no previous prototype for 'xsc_eth_build_nic_netdev' [-Wmissing-prototypes]
    2814 | void xsc_eth_build_nic_netdev(struct xsc_adapter *adapter)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:2885:5: warning: no previous prototype for 'xsc_eth_create_xdev_resources' [-Wmissing-prototypes]
    2885 | int xsc_eth_create_xdev_resources(struct xsc_core_device *xdev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/main.c:2906:5: warning: no previous prototype for 'xsc_eth_init_nic_rx' [-Wmissing-prototypes]
    2906 | int xsc_eth_init_nic_rx(struct xsc_adapter *adapter)
         |     ^~~~~~~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ctrl.c:302:6: warning: no previous prototype for 'xsc_eth_ctrl_fini' [-Wmissing-prototypes]
     302 | void xsc_eth_ctrl_fini(void)
         |      ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ctrl.c:307:5: warning: no previous prototype for 'xsc_eth_ctrl_init' [-Wmissing-prototypes]
     307 | int xsc_eth_ctrl_init(void)
         |     ^~~~~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_tx.c:30:5: warning: no previous prototype for 'xsc_tx_get_gso_ihs' [-Wmissing-prototypes]
      30 | u16 xsc_tx_get_gso_ihs(struct xsc_sq *sq, struct sk_buff *skb)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_tx.c:51:6: warning: no previous prototype for 'xsc_txwqe_build_cseg_csum' [-Wmissing-prototypes]
      51 | void xsc_txwqe_build_cseg_csum(struct xsc_sq *sq,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_tx.c:219:6: warning: no previous prototype for 'xsc_txwqe_complete' [-Wmissing-prototypes]
     219 | void xsc_txwqe_complete(struct xsc_sq *sq, struct sk_buff *skb,
         |      ^~~~~~~~~~~~~~~~~~
--
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_rx.c:478:6: warning: no previous prototype for 'xsc_page_dma_unmap' [-Wmissing-prototypes]
     478 | void xsc_page_dma_unmap(struct xsc_rq *rq, struct xsc_dma_info *dma_info)
         |      ^~~~~~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:124:5: warning: no previous prototype for 'xsc_priv_flags_num' [-Wmissing-prototypes]
     124 | int xsc_priv_flags_num(void)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:129:13: warning: no previous prototype for 'xsc_priv_flags_name' [-Wmissing-prototypes]
     129 | const char *xsc_priv_flags_name(int flag)
         |             ^~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:155:5: warning: no previous prototype for 'xsc_set_priv_flags' [-Wmissing-prototypes]
     155 | int xsc_set_priv_flags(struct net_device *dev, u32 pflags)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:254:5: warning: no previous prototype for 'xsc_get_priv_flags' [-Wmissing-prototypes]
     254 | u32 xsc_get_priv_flags(struct net_device *dev)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:736:5: warning: no previous prototype for 'xsc_get_rxnfc' [-Wmissing-prototypes]
     736 | int xsc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
         |     ^~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:759:5: warning: no previous prototype for 'xsc_set_rxnfc' [-Wmissing-prototypes]
     759 | int xsc_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
         |     ^~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:788:5: warning: no previous prototype for 'xsc_get_rxfh' [-Wmissing-prototypes]
     788 | int xsc_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, u8 *hfunc)
         |     ^~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_ethtool.c:807:5: warning: no previous prototype for 'xsc_set_rxfh' [-Wmissing-prototypes]
     807 | int xsc_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, const u8 hfunc)
         |     ^~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:136:4: warning: no previous prototype for 'xsc_devid_to_pcie_no' [-Wmissing-prototypes]
     136 | u8 xsc_devid_to_pcie_no(int dev_id)
         |    ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/main.c:288:5: warning: no previous prototype for 'xsc_priv_init' [-Wmissing-prototypes]
     288 | int xsc_priv_init(struct xsc_core_device *dev)
         |     ^~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/main.c:302:5: warning: no previous prototype for 'xsc_dev_res_init' [-Wmissing-prototypes]
     302 | int xsc_dev_res_init(struct xsc_core_device *dev)
         |     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:321:6: warning: no previous prototype for 'xsc_dev_res_cleanup' [-Wmissing-prototypes]
     321 | void xsc_dev_res_cleanup(struct xsc_core_device *dev)
         |      ^~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:327:6: warning: no previous prototype for 'xsc_init_reg_addr' [-Wmissing-prototypes]
     327 | void xsc_init_reg_addr(struct xsc_core_device *dev)
         |      ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:518:5: warning: no previous prototype for 'xsc_reset_function_resource' [-Wmissing-prototypes]
     518 | int xsc_reset_function_resource(struct xsc_core_device *dev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c: In function 'xsc_init_once':
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:612:33: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'?
     612 |                 if (!dev->pdev->physfn) {
         |                                 ^~~~~~
         |                                 is_physfn
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c: At top level:
>> drivers/net/ethernet/yunsilicon/xsc/pci/main.c:718:5: warning: no previous prototype for 'xsc_load_one' [-Wmissing-prototypes]
     718 | int xsc_load_one(struct xsc_core_device *dev, bool boot)
         |     ^~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/main.c:796:5: warning: no previous prototype for 'xsc_unload_one' [-Wmissing-prototypes]
     796 | int xsc_unload_one(struct xsc_core_device *dev, bool cleanup)
         |     ^~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:59:5: warning: no previous prototype for 'xsc_cmd_create_lag' [-Wmissing-prototypes]
      59 | int xsc_cmd_create_lag(struct xsc_lag *ldev, u8 flags)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:130:5: warning: no previous prototype for 'xsc_cmd_modify_lag' [-Wmissing-prototypes]
     130 | int xsc_cmd_modify_lag(struct xsc_lag *ldev)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:167:5: warning: no previous prototype for 'xsc_cmd_destroy_lag' [-Wmissing-prototypes]
     167 | int xsc_cmd_destroy_lag(struct xsc_lag *ldev, u8 bond_flags)
         |     ^~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:292:6: warning: no previous prototype for 'xsc_activate_lag' [-Wmissing-prototypes]
     292 | void xsc_activate_lag(struct xsc_lag *ldev, u8 flags)
         |      ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:310:6: warning: no previous prototype for 'xsc_modify_lag' [-Wmissing-prototypes]
     310 | void xsc_modify_lag(struct xsc_lag *ldev)
         |      ^~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:500:5: warning: no previous prototype for 'xsc_lag_dev_get_netdev_idx' [-Wmissing-prototypes]
     500 | int xsc_lag_dev_get_netdev_idx(struct xsc_lag *ldev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:512:22: warning: no previous prototype for 'bond_lag_hash_type' [-Wmissing-prototypes]
     512 | enum netdev_lag_hash bond_lag_hash_type(struct bonding *bond)
         |                      ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:723:6: warning: no previous prototype for 'xsc_esw_multipath_prereq' [-Wmissing-prototypes]
     723 | bool xsc_esw_multipath_prereq(struct xsc_core_device *xdev0,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:734:6: warning: no previous prototype for 'xsc_lag_multipath_check_prereq' [-Wmissing-prototypes]
     734 | bool xsc_lag_multipath_check_prereq(struct xsc_lag *ldev)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:976:28: warning: no previous prototype for 'xsc_lag_init_fib_work' [-Wmissing-prototypes]
     976 | struct xsc_fib_event_work *xsc_lag_init_fib_work(struct xsc_lag *ldev, unsigned long event)
         |                            ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:990:5: warning: no previous prototype for 'xsc_lag_fib_event' [-Wmissing-prototypes]
     990 | int xsc_lag_fib_event(struct notifier_block *nb,
         |     ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1063:5: warning: no previous prototype for 'xsc_lag_mp_init' [-Wmissing-prototypes]
    1063 | int xsc_lag_mp_init(struct xsc_lag *ldev)
         |     ^~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1091:5: warning: no previous prototype for '__xsc_lag_add_xdev' [-Wmissing-prototypes]
    1091 | int __xsc_lag_add_xdev(struct xsc_core_device *xdev)
         |     ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1141:6: warning: no previous prototype for 'xsc_lag_dev_add_pf' [-Wmissing-prototypes]
    1141 | void xsc_lag_dev_add_pf(struct xsc_lag *ldev,
         |      ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1156:6: warning: no previous prototype for 'xsc_lag_update_trackers' [-Wmissing-prototypes]
    1156 | void xsc_lag_update_trackers(struct xsc_lag *ldev)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1224:6: warning: no previous prototype for 'xsc_lag_dev_remove_pf' [-Wmissing-prototypes]
    1224 | void xsc_lag_dev_remove_pf(struct xsc_lag *ldev, struct xsc_core_device *xdev)
         |      ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1240:6: warning: no previous prototype for 'xsc_lag_mp_cleanup' [-Wmissing-prototypes]
    1240 | void xsc_lag_mp_cleanup(struct xsc_lag *ldev)
         |      ^~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1251:6: warning: no previous prototype for 'xsc_lag_dev_free' [-Wmissing-prototypes]
    1251 | void xsc_lag_dev_free(struct kref *ref)
         |      ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1265:6: warning: no previous prototype for 'xsc_lag_dev_put' [-Wmissing-prototypes]
    1265 | void xsc_lag_dev_put(struct xsc_lag *ldev)
         |      ^~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1285:6: warning: no previous prototype for 'xsc_lag_dev_remove_xdev' [-Wmissing-prototypes]
    1285 | void xsc_lag_dev_remove_xdev(struct xsc_lag *ldev, struct xsc_core_device *xdev)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_lag.c:1303:6: warning: no previous prototype for '__xsc_lag_remove_xdev' [-Wmissing-prototypes]
    1303 | void __xsc_lag_remove_xdev(struct xsc_core_device *xdev)
         |      ^~~~~~~~~~~~~~~~~~~~~
--
>> drivers/net/ethernet/yunsilicon/xsc/pci/xsc_pci_ctrl.c:255:5: warning: no previous prototype for 'noop_pre' [-Wmissing-prototypes]
     255 | int noop_pre(struct kprobe *p, struct pt_regs *regs) { return 0; }
         |     ^~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_pci_ctrl.c:264:5: warning: no previous prototype for 'find_kallsyms_lookup_name' [-Wmissing-prototypes]
     264 | int find_kallsyms_lookup_name(void)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/xsc_pci_ctrl.c:310:5: warning: no previous prototype for 'xsc_pci_ctrl_exec_ioctl' [-Wmissing-prototypes]
     310 | int xsc_pci_ctrl_exec_ioctl(struct xsc_core_device *xdev, void *in, int in_size, void *out,
         |     ^~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/net/ethernet/yunsilicon/xsc/pci/pci_irq.c:721:5: warning: no previous prototype for 'xsc_request_irq_for_cmdq' [-Wmissing-prototypes]
     721 | int xsc_request_irq_for_cmdq(struct xsc_core_device *dev, u8 vecidx)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/pci_irq.c:734:6: warning: no previous prototype for 'xsc_free_irq_for_cmdq' [-Wmissing-prototypes]
     734 | void xsc_free_irq_for_cmdq(struct xsc_core_device *dev)
         |      ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/pci_irq.c:756:5: warning: no previous prototype for 'xsc_request_irq_for_event' [-Wmissing-prototypes]
     756 | int xsc_request_irq_for_event(struct xsc_core_device *dev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/yunsilicon/xsc/pci/pci_irq.c:767:6: warning: no previous prototype for 'xsc_free_irq_for_event' [-Wmissing-prototypes]
     767 | void xsc_free_irq_for_event(struct xsc_core_device *dev)
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/yunsilicon/xsc/pci/pci_irq.c:773:5: warning: no previous prototype for 'xsc_cmd_enable_msix' [-Wmissing-prototypes]
     773 | int xsc_cmd_enable_msix(struct xsc_core_device *xdev)
         |     ^~~~~~~~~~~~~~~~~~~
..
vim +/xsc_eth_cq_error_event +197 drivers/net/ethernet/yunsilicon/xsc/net/main.c
   165	
 > 166	int xsc_rx_alloc_page_cache(struct xsc_rq *rq, int node, u8 log_init_sz)
   167	{
   168		struct xsc_page_cache *cache = &rq->page_cache;
   169	
   170		cache->sz = 1 << log_init_sz;
   171		cache->page_cache = kvzalloc_node(cache->sz * sizeof(*cache->page_cache),
   172						  GFP_KERNEL, node);
   173		if (!cache->page_cache)
   174			return -ENOMEM;
   175	
   176		return 0;
   177	}
   178	
   179	void xsc_rx_free_page_cache(struct xsc_rq *rq)
   180	{
   181		struct xsc_page_cache *cache = &rq->page_cache;
   182		u32 i;
   183	
   184		for (i = cache->head; i != cache->tail; i = (i + 1) & (cache->sz - 1)) {
   185			struct xsc_dma_info *dma_info = &cache->page_cache[i];
   186	
   187			xsc_page_release_dynamic(rq, dma_info, false);
   188		}
   189		kvfree(cache->page_cache);
   190	}
   191	
   192	int xsc_eth_reset(struct xsc_core_device *dev)
   193	{
   194		return 0;
   195	}
   196	
 > 197	void xsc_eth_cq_error_event(struct xsc_core_cq *xcq, enum xsc_event event)
   198	{
   199		struct xsc_cq *xsc_cq = container_of(xcq, struct xsc_cq, xcq);
   200		struct xsc_core_device *xdev = xsc_cq->xdev;
   201	
   202		if (event != XSC_EVENT_TYPE_CQ_ERROR) {
   203			xsc_core_err(xdev, "Unexpected event type %d on CQ %06x\n",
   204				     event, xcq->cqn);
   205			return;
   206		}
   207	
   208		xsc_core_err(xdev, "Eth catch CQ ERROR:%x, cqn: %d\n", event, xcq->cqn);
   209	}
   210	
 > 211	void xsc_eth_completion_event(struct xsc_core_cq *xcq)
   212	{
   213		struct xsc_cq *cq = container_of(xcq, struct xsc_cq, xcq);
   214		struct xsc_core_device *xdev = cq->xdev;
   215		struct xsc_rq *rq = NULL;
   216	
   217		if (unlikely(!cq->channel)) {
   218			xsc_core_warn(xdev, "cq%d->channel is null\n", xcq->cqn);
   219			return;
   220		}
   221	
   222		rq = &cq->channel->qp.rq[0];
   223	
   224		set_bit(XSC_CHANNEL_NAPI_SCHED, &cq->channel->flags);
   225		cq->channel->stats->events++;
   226		cq->channel->stats->poll = 0;
   227		if (cq->rx)
   228			cq->channel->rx_int = 1;
   229		else
   230			cq->channel->rx_int = 0;
   231	
   232		if (!test_bit(XSC_ETH_RQ_STATE_ENABLED, &rq->state))
   233			xsc_core_warn(xdev, "ch%d_cq%d, napi_flag=0x%lx\n",
   234				      cq->channel->chl_idx, xcq->cqn, cq->napi->state);
   235	
   236		napi_schedule(cq->napi);
   237	}
   238	
   239	static inline int xsc_cmd_destroy_cq(struct xsc_core_device *dev, struct xsc_core_cq *xcq)
   240	{
   241		struct xsc_destroy_cq_mbox_in in;
   242		struct xsc_destroy_cq_mbox_out out;
   243		int err;
   244	
   245		memset(&in, 0, sizeof(in));
   246		memset(&out, 0, sizeof(out));
   247		in.hdr.opcode = cpu_to_be16(XSC_CMD_OP_DESTROY_CQ);
   248		in.cqn = cpu_to_be32(xcq->cqn);
   249		err = xsc_cmd_exec(dev, &in, sizeof(in), &out, sizeof(out));
   250		if (err || out.hdr.status) {
   251			xsc_core_err(dev, "failed to destroy cq, err=%d out.status=%u\n",
   252				     err, out.hdr.status);
   253			return -ENOEXEC;
   254		}
   255	
   256		xcq->cqn = 0;
   257		return 0;
   258	}
   259	
   260	int xsc_eth_create_cq(struct xsc_core_device *xdev, struct xsc_core_cq *xcq,
   261			      struct xsc_create_cq_mbox_in *in, int insize)
   262	{
   263		int err, ret = -1;
   264		struct xsc_cq_table *table = &xdev->dev_res->cq_table;
   265		struct xsc_create_cq_mbox_out out;
   266	
   267		in->hdr.opcode = cpu_to_be16(XSC_CMD_OP_CREATE_CQ);
   268		ret = xsc_cmd_exec(xdev, in, insize, &out, sizeof(out));
   269		if (ret || out.hdr.status) {
   270			xsc_core_err(xdev, "failed to create cq, err=%d out.status=%u\n",
   271				     ret, out.hdr.status);
   272			return -ENOEXEC;
   273		}
   274	
   275		xcq->cqn = be32_to_cpu(out.cqn) & 0xffffff;
   276		xcq->cons_index = 0;
   277		xcq->arm_sn = 0;
   278		atomic_set(&xcq->refcount, 1);
   279		init_completion(&xcq->free);
   280	
   281		spin_lock_irq(&table->lock);
   282		ret = radix_tree_insert(&table->tree, xcq->cqn, xcq);
   283		spin_unlock_irq(&table->lock);
   284		if (ret)
   285			goto err_insert_cq;
   286		return 0;
   287	
   288	err_insert_cq:
   289		err = xsc_cmd_destroy_cq(xdev, xcq);
   290		if (err)
   291			xsc_core_warn(xdev, "failed to destroy cqn=%d, err=%d\n", xcq->cqn, err);
   292		return ret;
   293	}
   294	
   295	int xsc_eth_destroy_cq(struct xsc_core_device *xdev, struct xsc_cq *cq)
   296	{
   297		struct xsc_cq_table *table = &xdev->dev_res->cq_table;
   298		struct xsc_core_cq *tmp;
   299		int err;
   300	
   301		spin_lock_irq(&table->lock);
   302		tmp = radix_tree_delete(&table->tree, cq->xcq.cqn);
   303		spin_unlock_irq(&table->lock);
   304		if (!tmp) {
   305			err = -ENOENT;
   306			goto err_delete_cq;
   307		}
   308	
   309		if (tmp != &cq->xcq) {
   310			err = -EINVAL;
   311			goto err_delete_cq;
   312		}
   313	
   314		err = xsc_cmd_destroy_cq(xdev, &cq->xcq);
   315		if (err)
   316			goto err_destroy_cq;
   317	
   318		if (atomic_dec_and_test(&cq->xcq.refcount))
   319			complete(&cq->xcq.free);
   320		wait_for_completion(&cq->xcq.free);
   321		return 0;
   322	
   323	err_destroy_cq:
   324		xsc_core_warn(xdev, "failed to destroy cqn=%d, err=%d\n",
   325			      cq->xcq.cqn, err);
   326		return err;
   327	err_delete_cq:
   328		xsc_core_warn(xdev, "cqn=%d not found in tree, err=%d\n",
   329			      cq->xcq.cqn, err);
   330		return err;
   331	}
   332	
 > 333	void xsc_eth_free_cq(struct xsc_cq *cq)
   334	{
   335		xsc_eth_wq_destroy(&cq->wq_ctrl);
   336	}
   337	
   338	int xsc_eth_create_rss_qp_rqs(struct xsc_core_device *xdev,
   339				      struct xsc_create_multiqp_mbox_in *in,
   340				      int insize,
   341				      int *prqn_base)
   342	{
   343		int ret;
   344		struct xsc_create_multiqp_mbox_out out;
   345	
   346		in->hdr.opcode = cpu_to_be16(XSC_CMD_OP_CREATE_MULTI_QP);
   347		ret = xsc_cmd_exec(xdev, in, insize, &out, sizeof(out));
   348		if (ret || out.hdr.status) {
   349			xsc_core_err(xdev,
   350				     "failed to create rss rq, qp_num=%d, type=%d, err=%d out.status=%u\n",
   351				     in->qp_num, in->qp_type, ret, out.hdr.status);
   352			return -ENOEXEC;
   353		}
   354	
   355		*prqn_base = be32_to_cpu(out.qpn_base) & 0xffffff;
   356		return 0;
   357	}
   358	
 > 359	void xsc_eth_qp_event(struct xsc_core_qp *qp, int type)
   360	{
   361		struct xsc_rq *rq;
   362		struct xsc_sq *sq;
   363		struct xsc_core_device *xdev;
   364	
   365		if (qp->eth_queue_type == XSC_RES_RQ) {
   366			rq = container_of(qp, struct xsc_rq, cqp);
   367			xdev = rq->cq.xdev;
   368		} else if (qp->eth_queue_type == XSC_RES_SQ) {
   369			sq = container_of(qp, struct xsc_sq, cqp);
   370			xdev = sq->cq.xdev;
   371		} else {
   372			pr_err("%s:Unknown eth qp type %d\n", __func__, type);
   373			return;
   374		}
   375	
   376		switch (type) {
   377		case XSC_EVENT_TYPE_WQ_CATAS_ERROR:
   378		case XSC_EVENT_TYPE_WQ_INVAL_REQ_ERROR:
   379		case XSC_EVENT_TYPE_WQ_ACCESS_ERROR:
   380			xsc_core_err(xdev, "%s:Async event %x on QP %d\n", __func__, type, qp->qpn);
   381			break;
   382		default:
   383			xsc_core_err(xdev, "%s: Unexpected event type %d on QP %d\n",
   384				     __func__, type, qp->qpn);
   385			return;
   386		}
   387	}
   388	
 > 389	int xsc_eth_create_qp_rq(struct xsc_core_device *xdev, struct xsc_rq *prq,
   390				 struct xsc_create_qp_mbox_in *in, int insize)
   391	{
   392		int ret = -1;
   393		struct xsc_create_qp_mbox_out out;
   394	
   395		in->hdr.opcode = cpu_to_be16(XSC_CMD_OP_CREATE_QP);
   396		ret = xsc_cmd_exec(xdev, in, insize, &out, sizeof(out));
   397		if (ret || out.hdr.status) {
   398			xsc_core_err(xdev, "failed to create rq, err=%d out.status=%u\n",
   399				     ret, out.hdr.status);
   400			return -ENOEXEC;
   401		}
   402	
   403		prq->rqn = be32_to_cpu(out.qpn) & 0xffffff;
   404		prq->cqp.event = xsc_eth_qp_event;
   405		prq->cqp.eth_queue_type = XSC_RES_RQ;
   406	
   407		ret = create_resource_common(xdev, &prq->cqp);
   408		if (ret) {
   409			xsc_core_err(xdev, "%s:error qp:%d errno:%d\n", __func__, prq->rqn, ret);
   410			return ret;
   411		}
   412	
   413		return 0;
   414	}
   415	
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0