BCC: lkp(a)intel.com CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Lorenzo Bianconi CC: Felix Fietkau tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 commit: 3782b69d03e714b8ff98b84c7426d8cef0e64d7c mt76: mt7915: introduce mt7915_mac_add_twt_setup routine date: 10 months ago :::::: branch date: 3 hours ago :::::: commit date: 10 months ago config: ia64-randconfig-m031-20220814 (https://download.01.org/0day-ci/archive/20220815/202208150940.Mkzr1sPZ-lkp(a)intel.com/config) compiler: ia64-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: drivers/net/wireless/mediatek/mt76/mt7915/mac.c:2285 mt7915_mac_twt_sched_list_add() error: uninitialized symbol 'start_tsf'. Old smatch warnings: drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1312 mt7915_mac_tx_free() warn: potential spectre issue 'dev->mt76.wcid' [w] vim +/start_tsf +2285 drivers/net/wireless/mediatek/mt76/mt7915/mac.c 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2252 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2253 static u64 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2254 mt7915_mac_twt_sched_list_add(struct mt7915_dev *dev, 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2255 struct mt7915_twt_flow *flow) 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2256 { 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2257 struct mt7915_twt_flow *iter, *iter_next; 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2258 u32 duration = flow->duration << 8; 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2259 u64 start_tsf; 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2260 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2261 iter = list_first_entry_or_null(&dev->twt_list, 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2262 struct mt7915_twt_flow, list); 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2263 if (!iter || !iter->sched || iter->start_tsf > duration) { 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2264 /* add flow as first entry in the list */ 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2265 list_add(&flow->list, &dev->twt_list); 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2266 return 0; 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2267 } 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2268 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2269 list_for_each_entry_safe(iter, iter_next, &dev->twt_list, list) { 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2270 start_tsf = iter->start_tsf + 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2271 mt7915_mac_twt_duration_align(iter->duration); 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2272 if (list_is_last(&iter->list, &dev->twt_list)) 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2273 break; 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2274 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2275 if (!iter_next->sched || 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2276 iter_next->start_tsf > start_tsf + duration) { 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2277 list_add(&flow->list, &iter->list); 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2278 goto out; 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2279 } 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2280 } 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2281 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2282 /* add flow as last entry in the list */ 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2283 list_add_tail(&flow->list, &dev->twt_list); 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2284 out: 3782b69d03e714 Lorenzo Bianconi 2021-09-23 @2285 return start_tsf; 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2286 } 3782b69d03e714 Lorenzo Bianconi 2021-09-23 2287 -- 0-DAY CI Kernel Test Service https://01.org/lkp