BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Lorenzo Bianconi <[email protected]>
CC: Felix Fietkau <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   274a2eebf80c60246f9edd6ef8e9a095ad121264
commit: 3782b69d03e714b8ff98b84c7426d8cef0e64d7c mt76: mt7915: introduce 
mt7915_mac_add_twt_setup routine
date:   10 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 10 months ago
config: ia64-randconfig-m031-20220814 
(https://download.01.org/0day-ci/archive/20220818/[email protected]/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 <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

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

3782b69d03e714b Lorenzo Bianconi 2021-09-23  2252  
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2253  static u64
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2254  
mt7915_mac_twt_sched_list_add(struct mt7915_dev *dev,
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2255                             
struct mt7915_twt_flow *flow)
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2256  {
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2257       struct mt7915_twt_flow 
*iter, *iter_next;
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2258       u32 duration = 
flow->duration << 8;
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2259       u64 start_tsf;
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2260  
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2261       iter = 
list_first_entry_or_null(&dev->twt_list,
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2262                               
        struct mt7915_twt_flow, list);
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2263       if (!iter || 
!iter->sched || iter->start_tsf > duration) {
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2264               /* add flow as 
first entry in the list */
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2265               
list_add(&flow->list, &dev->twt_list);
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2266               return 0;
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2267       }
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2268  
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2269       
list_for_each_entry_safe(iter, iter_next, &dev->twt_list, list) {
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2270               start_tsf = 
iter->start_tsf +
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2271                           
mt7915_mac_twt_duration_align(iter->duration);
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2272               if 
(list_is_last(&iter->list, &dev->twt_list))
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2273                       break;
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2274  
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2275               if 
(!iter_next->sched ||
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2276                   
iter_next->start_tsf > start_tsf + duration) {
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2277                       
list_add(&flow->list, &iter->list);
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2278                       goto 
out;
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2279               }
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2280       }
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2281  
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2282       /* add flow as last 
entry in the list */
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2283       
list_add_tail(&flow->list, &dev->twt_list);
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2284  out:
3782b69d03e714b Lorenzo Bianconi 2021-09-23 @2285       return start_tsf;
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2286  }
3782b69d03e714b Lorenzo Bianconi 2021-09-23  2287  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to