public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Ryder Lee <ryder.lee@mediatek.com>,
	Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	Shayne Chen <shayne.chen@mediatek.com>,
	linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	Ryder Lee <ryder.lee@mediatek.com>
Subject: [kbuild] Re: [PATCH v2 1/2] mt76: mt7915: add missing capabilities for DBDC
Date: Wed, 10 Mar 2021 11:30:18 +0300	[thread overview]
Message-ID: <20210310083018.GH21246@kadam> (raw)
In-Reply-To: <dd852df70c61ad730f39566ed6fa22c736ce5942.1614239710.git.ryder.lee@mediatek.com>

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

Hi Ryder,

url:    https://github.com/0day-ci/linux/commits/Ryder-Lee/mt76-mt7915-add-missing-capabilities-for-DBDC/20210225-230323 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git  master
config: x86_64-randconfig-m001-20210309 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7915/init.c:353 mt7915_set_stream_vht_txbf_caps() error: potentially dereferencing uninitialized 'cap'.

vim +/cap +353 drivers/net/wireless/mediatek/mt76/mt7915/init.c

00b2e16e006390 Ryder Lee 2020-05-12  344  void mt7915_set_stream_vht_txbf_caps(struct mt7915_phy *phy)
00b2e16e006390 Ryder Lee 2020-05-12  345  {
50a6fe79623e22 Ryder Lee 2021-02-25  346  	int nss;
50a6fe79623e22 Ryder Lee 2021-02-25  347  	u32 *cap;
50a6fe79623e22 Ryder Lee 2021-02-25  348  
50a6fe79623e22 Ryder Lee 2021-02-25  349  	if (!phy->mt76->cap.has_5ghz)
50a6fe79623e22 Ryder Lee 2021-02-25  350  		return;
50a6fe79623e22 Ryder Lee 2021-02-25  351  
50a6fe79623e22 Ryder Lee 2021-02-25  352  	nss = hweight8(phy->mt76->chainmask);
50a6fe79623e22 Ryder Lee 2021-02-25 @353  	*cap = &phy->mt76->sband_5g.sband.vht_cap.cap;
                                                ^^^^
"cap" isn't initialized.

00b2e16e006390 Ryder Lee 2020-05-12  354  
00b2e16e006390 Ryder Lee 2020-05-12  355  	*cap |= IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12  356  		IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12  357  		(3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT);
00b2e16e006390 Ryder Lee 2020-05-12  358  
00b2e16e006390 Ryder Lee 2020-05-12  359  	*cap &= ~(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK |
00b2e16e006390 Ryder Lee 2020-05-12  360  		  IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12  361  		  IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE);
00b2e16e006390 Ryder Lee 2020-05-12  362  
00b2e16e006390 Ryder Lee 2020-05-12  363  	if (nss < 2)
00b2e16e006390 Ryder Lee 2020-05-12  364  		return;
00b2e16e006390 Ryder Lee 2020-05-12  365  
00b2e16e006390 Ryder Lee 2020-05-12  366  	*cap |= IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12  367  		IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12  368  		FIELD_PREP(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK,
00b2e16e006390 Ryder Lee 2020-05-12  369  			   nss - 1);
00b2e16e006390 Ryder Lee 2020-05-12  370  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41137 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

[-- Attachment #4: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  parent reply	other threads:[~2021-03-10  8:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 14:58 [PATCH v2 1/2] mt76: mt7915: add missing capabilities for DBDC Ryder Lee
2021-02-25 14:58 ` [PATCH v2 2/2] mt76: mt7615: " Ryder Lee
2021-03-10  8:30 ` Dan Carpenter [this message]
2021-03-10  8:54   ` [kbuild] Re: [PATCH v2 1/2] mt76: mt7915: " Ryder Lee

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=20210310083018.GH21246@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox