
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: ea2f61405cf31bc46bf79f5297ca294ea5a7a9c7 commit: 11fa263277520b886a650fadf4f719a2878229d0 [2886/2886] Add poll method for nfs for virtCCA CVM. config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250913/202509130621.eY2Y6kXo-lkp@i...) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250913/202509130621.eY2Y6kXo-lkp@i...) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202509130621.eY2Y6kXo-lkp@intel.com/ All warnings (new ones prefixed by >>):
drivers/infiniband/core/ib_core_cq_poll.c:92:6: warning: no previous prototype for function 'cq_polling' [-Wmissing-prototypes] 92 | void cq_polling(void *data) | ^ drivers/infiniband/core/ib_core_cq_poll.c:92:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 92 | void cq_polling(void *data) | ^ | static drivers/infiniband/core/ib_core_cq_poll.c:123:6: warning: no previous prototype for function 'wakeup_and_poll' [-Wmissing-prototypes] 123 | void wakeup_and_poll(struct task_struct *awakened_thread) | ^ drivers/infiniband/core/ib_core_cq_poll.c:123:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 123 | void wakeup_and_poll(struct task_struct *awakened_thread) | ^ | static drivers/infiniband/core/ib_core_cq_poll.c:130:5: warning: no previous prototype for function 'polling_thread' [-Wmissing-prototypes] 130 | int polling_thread(void *data) | ^ drivers/infiniband/core/ib_core_cq_poll.c:130:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 130 | int polling_thread(void *data) | ^ | static drivers/infiniband/core/ib_core_cq_poll.c:147:5: warning: no previous prototype for function 'polling_awaken_thread' [-Wmissing-prototypes] 147 | int polling_awaken_thread(void *data) | ^ drivers/infiniband/core/ib_core_cq_poll.c:147:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 147 | int polling_awaken_thread(void *data) | ^ | static 4 warnings generated.
vim +/cq_polling +92 drivers/infiniband/core/ib_core_cq_poll.c 91
92 void cq_polling(void *data) 93 { 94 void *cq; 95 int completed = 0; 96 unsigned long flags; 97 u64 time_interval; 98 ktime_t start_time_stamp, end_time_stamp; 99 struct cq_poll_node *poll_node_entry, *poll_node_next; 100 101 spin_lock_irqsave(&cq_list_lock, flags); 102 list_for_each_entry_safe(poll_node_entry, poll_node_next, 103 &ib_cq_poll_list, list) { 104 cq = poll_node_entry->cq; 105 if (!cq) { 106 WARN_ONCE(1, "got NULL CQ 0x%p in poll list\n", cq); 107 continue; 108 } 109 start_time_stamp = ktime_get(); 110 completed = ib_poll_cq_thread(cq); 111 end_time_stamp = ktime_get(); 112 if (ib_cq_polling_kthread.debug_cq_poll_stat && completed) { 113 time_interval = ktime_to_ns(ktime_sub(end_time_stamp, start_time_stamp)); 114 poll_node_entry->time_used_ns += time_interval; 115 poll_node_entry->poll_cq_cnt++; 116 if (poll_node_entry->max_time_ns < time_interval) 117 poll_node_entry->max_time_ns = time_interval; 118 } 119 } 120 spin_unlock_irqrestore(&cq_list_lock, flags); 121 } 122 123 void wakeup_and_poll(struct task_struct *awakened_thread) 124 { 125 wake_up_process(awakened_thread); 126 127 cq_polling(NULL); 128 } 129 130 int polling_thread(void *data) 131 { 132 while (true) { 133 if (ib_cq_polling_kthread.use_polling_kthread) 134 wakeup_and_poll(waker_polling_thread); 135 136 set_current_state(TASK_INTERRUPTIBLE); 137 if (unlikely(kthread_should_stop())) { 138 set_current_state(TASK_RUNNING); 139 break; 140 } 141 schedule(); 142 } 143 144 return 0; 145 } 146 147 int polling_awaken_thread(void *data) 148 { 149 while (true) { 150 if (ib_cq_polling_kthread.use_polling_kthread) 151 wakeup_and_poll(poll_cq_thread); 152 153 set_current_state(TASK_INTERRUPTIBLE); 154 if (unlikely(kthread_should_stop())) { 155 set_current_state(TASK_RUNNING); 156 break; 157 } 158 schedule(); 159 } 160 161 return 0; 162 } 163
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki