public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Wen Gong <wgong@codeaurora.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jouni Malinen <jouni@codeaurora.org>,
	Johannes Berg <johannes.berg@intel.com>
Subject: [linux-stable-rc:linux-5.4.y 6817/6970] drivers/net/wireless/ath/ath10k/htt_rx.c:1773:7: warning: variable 'more_frags' set but not used
Date: Mon, 6 Sep 2021 11:40:12 +0800	[thread overview]
Message-ID: <202109061159.JYnPdybM-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head:   70154d2f82a9058e8316b6e106071c72fcc58718
commit: 6bf449a34c0de8becabc3d3a9f76b32cb287347e [6817/6970] ath10k: add CCMP PN replay protection for fragmented frames for PCIe
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=6bf449a34c0de8becabc3d3a9f76b32cb287347e
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-5.4.y
        git checkout 6bf449a34c0de8becabc3d3a9f76b32cb287347e
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath10k/htt_rx.c: In function 'ath10k_htt_rx_h_frag_pn_check':
>> drivers/net/wireless/ath/ath10k/htt_rx.c:1773:7: warning: variable 'more_frags' set but not used [-Wunused-but-set-variable]
    1773 |  bool more_frags;
         |       ^~~~~~~~~~


vim +/more_frags +1773 drivers/net/wireless/ath/ath10k/htt_rx.c

  1763	
  1764	static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
  1765						  struct sk_buff *skb,
  1766						  u16 peer_id,
  1767						  u16 offset,
  1768						  enum htt_rx_mpdu_encrypt_type enctype)
  1769	{
  1770		struct ath10k_peer *peer;
  1771		union htt_rx_pn_t *last_pn, new_pn = {0};
  1772		struct ieee80211_hdr *hdr;
> 1773		bool more_frags;
  1774		u8 tid, frag_number;
  1775		u32 seq;
  1776	
  1777		peer = ath10k_peer_find_by_id(ar, peer_id);
  1778		if (!peer) {
  1779			ath10k_dbg(ar, ATH10K_DBG_HTT, "invalid peer for frag pn check\n");
  1780			return false;
  1781		}
  1782	
  1783		hdr = (struct ieee80211_hdr *)(skb->data + offset);
  1784		if (ieee80211_is_data_qos(hdr->frame_control))
  1785			tid = ieee80211_get_tid(hdr);
  1786		else
  1787			tid = ATH10K_TXRX_NON_QOS_TID;
  1788	
  1789		last_pn = &peer->frag_tids_last_pn[tid];
  1790		new_pn.pn48 = ath10k_htt_rx_h_get_pn(ar, skb, offset, enctype);
  1791		more_frags = ieee80211_has_morefrags(hdr->frame_control);
  1792		frag_number = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG;
  1793		seq = (__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
  1794	
  1795		if (frag_number == 0) {
  1796			last_pn->pn48 = new_pn.pn48;
  1797			peer->frag_tids_seq[tid] = seq;
  1798		} else {
  1799			if (seq != peer->frag_tids_seq[tid])
  1800				return false;
  1801	
  1802			if (new_pn.pn48 != last_pn->pn48 + 1)
  1803				return false;
  1804	
  1805			last_pn->pn48 = new_pn.pn48;
  1806		}
  1807	
  1808		return true;
  1809	}
  1810	

---
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: 60200 bytes --]

                 reply	other threads:[~2021-09-06  3:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202109061159.JYnPdybM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes.berg@intel.com \
    --cc=jouni@codeaurora.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wgong@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