linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: kbuild test robot <lkp@intel.com>
Cc: Maya Erez <merez@codeaurora.org>,
	kbuild-all@01.org, ath10k@lists.infradead.org,
	linux-wireless@vger.kernel.org
Subject: Re: [ath6kl:pending 12/32] drivers/net/wireless/ath/wil6210/txrx.c:341:25: warning: 'rtap' may be used uninitialized in this function
Date: Sat, 09 Feb 2019 10:31:18 +0200	[thread overview]
Message-ID: <87pns17489.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <201902090225.xWQGRZWS%fengguang.wu@intel.com> (kbuild test robot's message of "Sat, 9 Feb 2019 02:26:28 +0800")

+ linux-wireless

kbuild test robot <lkp@intel.com> writes:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
> head:   6e56895b48f885973e44231cac5f3f39a7068d36
> commit: 18c7c63dcc54feb0e0438ff20b528ea3945d82e0 [12/32] wil6210: remove rtap_include_phy_info module param
> config: xtensa-allyesconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 8.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 18c7c63dcc54feb0e0438ff20b528ea3945d82e0
>         # save the attached .config to linux build tree
>         GCC_VERSION=8.2.0 make.cross ARCH=xtensa 
>
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
>
> All warnings (new ones prefixed by >>):
>
>    drivers/net/wireless/ath/wil6210/txrx.c: In function 'wil_vring_reap_rx':
>>> drivers/net/wireless/ath/wil6210/txrx.c:341:25: warning: 'rtap' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      rtap->rthdr.it_version = PKTHDR_RADIOTAP_VERSION;
>    drivers/net/wireless/ath/wil6210/txrx.c:331:23: note: 'rtap' was declared here
>      struct wil6210_rtap *rtap;
>                           ^~~~
>
> vim +/rtap +341 drivers/net/wireless/ath/wil6210/txrx.c
>
>    304	
>    305	/**
>    306	 * Adds radiotap header
>    307	 *
>    308	 * Any error indicated as "Bad FCS"
>    309	 *
>    310	 * Vendor data for 04:ce:14-1 (Wilocity-1) consists of:
>    311	 *  - Rx descriptor: 32 bytes
>    312	 *  - Phy info
>    313	 */
>    314	static void wil_rx_add_radiotap_header(struct wil6210_priv *wil,
>    315					       struct sk_buff *skb)
>    316	{
>    317		struct wil6210_rtap {
>    318			struct ieee80211_radiotap_header rthdr;
>    319			/* fields should be in the order of bits in rthdr.it_present */
>    320			/* flags */
>    321			u8 flags;
>    322			/* channel */
>    323			__le16 chnl_freq __aligned(2);
>    324			__le16 chnl_flags;
>    325			/* MCS */
>    326			u8 mcs_present;
>    327			u8 mcs_flags;
>    328			u8 mcs_index;
>    329		} __packed;

This is an odd place to define a structure.

>    330		struct vring_rx_desc *d = wil_skb_rxdesc(skb);
>    331		struct wil6210_rtap *rtap;
>    332		int rtap_len = sizeof(struct wil6210_rtap);
>    333		struct ieee80211_channel *ch = wil->monitor_chandef.chan;
>    334	
>    335		if (skb_headroom(skb) < rtap_len &&
>    336		    pskb_expand_head(skb, rtap_len, 0, GFP_ATOMIC)) {
>    337			wil_err(wil, "Unable to expand headroom to %d\n", rtap_len);
>    338			return;
>    339		}
>    340	
>  > 341		rtap->rthdr.it_version = PKTHDR_RADIOTAP_VERSION;

Looks like a valid warning to me.

-- 
Kalle Valo

           reply	other threads:[~2019-02-09  8:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <201902090225.xWQGRZWS%fengguang.wu@intel.com>]

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=87pns17489.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=kbuild-all@01.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=merez@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).