All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/wireless/mediatek/mt76/mt7915/mac.c:2285 mt7915_mac_twt_sched_list_add() error: uninitialized symbol 'start_tsf'.
Date: Thu, 18 Aug 2022 07:17:20 +0800	[thread overview]
Message-ID: <202208180748.JgNDcVEO-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4063 bytes --]

BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Lorenzo Bianconi <lorenzo@kernel.org>
CC: Felix Fietkau <nbd@nbd.name>

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/202208180748.JgNDcVEO-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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

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

             reply	other threads:[~2022-08-17 23:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 23:17 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-19 11:56 drivers/net/wireless/mediatek/mt76/mt7915/mac.c:2285 mt7915_mac_twt_sched_list_add() error: uninitialized symbol 'start_tsf' kernel test robot
2022-08-15 23:44 kernel test robot
2022-08-15  1:52 kernel test robot
2022-04-24  7:24 kernel test robot
2021-11-21  4:04 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202208180748.JgNDcVEO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.