public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Martin Kaiser <martin@kaiser.cx>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kbuild-all@lists.01.org, Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Michael Straube <straube.linux@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Martin Kaiser <martin@kaiser.cx>
Subject: Re: [PATCH 1/7] staging: r8188eu: use ieee80211 define for version check
Date: Thu, 24 Mar 2022 07:59:55 +0800	[thread overview]
Message-ID: <202203240701.1JNFezRj-lkp@intel.com> (raw)
In-Reply-To: <20220323074859.177425-2-martin@kaiser.cx>

Hi Martin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Martin-Kaiser/staging-r8188eu-use-ieee80211-helpers-for-parsing/20220323-155119
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 41197a5f11a4b2d11ac19bc62552022153032811
config: sh-randconfig-s031-20220323 (https://download.01.org/0day-ci/archive/20220324/202203240701.1JNFezRj-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/ab583161be478f342c621b22766fc7f233769bef
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Martin-Kaiser/staging-r8188eu-use-ieee80211-helpers-for-parsing/20220323-155119
        git checkout ab583161be478f342c621b22766fc7f233769bef
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sh SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> drivers/staging/r8188eu/core/rtw_recv.c:1074:14: sparse: sparse: restricted __le16 degrades to integer

vim +1074 drivers/staging/r8188eu/core/rtw_recv.c

  1054	
  1055	static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv_frame)
  1056	{
  1057		/* shall check frame subtype, to / from ds, da, bssid */
  1058	
  1059		/* then call check if rx seq/frag. duplicated. */
  1060	
  1061		int retval = _FAIL;
  1062		u8 bDumpRxPkt;
  1063		struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
  1064		u8 *ptr = precv_frame->rx_data;
  1065		__le16 fc = *(__le16 *)ptr;
  1066		struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
  1067	
  1068		if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
  1069			int ch_set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, rtw_get_oper_ch(adapter));
  1070			if (ch_set_idx >= 0)
  1071				pmlmeext->channel_set[ch_set_idx].rx_count++;
  1072		}
  1073	
> 1074		if ((fc & IEEE80211_FCTL_VERS) != 0)
  1075			return _FAIL;
  1076	
  1077		pattrib->to_fr_ds = get_tofr_ds(ptr);
  1078	
  1079		pattrib->frag_num = GetFragNum(ptr);
  1080		pattrib->seq_num = GetSequence(ptr);
  1081	
  1082		pattrib->pw_save = GetPwrMgt(ptr);
  1083		pattrib->mfrag = ieee80211_has_morefrags(fc);
  1084		pattrib->mdata = ieee80211_has_moredata(fc);
  1085		pattrib->privacy = ieee80211_has_protected(fc);
  1086		pattrib->order = ieee80211_has_order(fc);
  1087	
  1088		/* Dump rx packets */
  1089		GetHalDefVar8188EUsb(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt);
  1090	
  1091		/* We return _SUCCESS only for data frames. */
  1092		if (ieee80211_is_mgmt(fc))
  1093			validate_recv_mgnt_frame(adapter, precv_frame);
  1094		else if (ieee80211_is_ctl(fc))
  1095			validate_recv_ctrl_frame(adapter, precv_frame);
  1096		else if (ieee80211_is_data(fc)) {
  1097			rtw_led_control(adapter, LED_CTL_RX);
  1098			pattrib->qos = ieee80211_is_data_qos(fc);
  1099			retval = validate_recv_data_frame(adapter, precv_frame);
  1100			if (retval == _FAIL) {
  1101				struct recv_priv *precvpriv = &adapter->recvpriv;
  1102				precvpriv->rx_drop++;
  1103			}
  1104		}
  1105	
  1106		return retval;
  1107	}
  1108	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  parent reply	other threads:[~2022-03-24  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23  7:48 [PATCH 0/7] staging: r8188eu: use ieee80211 helpers for parsing Martin Kaiser
2022-03-23  7:48 ` [PATCH 1/7] staging: r8188eu: use ieee80211 define for version check Martin Kaiser
2022-03-23 14:28   ` David Laight
2022-03-27 18:19     ` Martin Kaiser
2022-03-23 23:59   ` kernel test robot [this message]
2022-03-23  7:48 ` [PATCH 2/7] staging: r8188eu: use ieee80211 helper to read the pwr bit Martin Kaiser
2022-03-23  7:48 ` [PATCH 3/7] staging: r8188eu: use standard mechanisms for control frames Martin Kaiser
2022-03-23  7:48 ` [PATCH 4/7] staging: r8188eu: use standard mechanisms for data frames Martin Kaiser
2022-03-23  7:48 ` [PATCH 5/7] staging: r8188eu: use standard mechanisms for qos " Martin Kaiser
2022-03-23  7:48 ` [PATCH 6/7] staging: r8188eu: remove unused data frame subtypes Martin Kaiser
2022-03-23  7:48 ` [PATCH 7/7] staging: r8188eu: remove unused control " Martin Kaiser
2022-03-27 18:09 ` [PATCH v2 0/9] staging: r8188eu: use ieee80211 helpers for parsing Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 1/9] staging: r8188eu: use ieee80211 define for version check Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 2/9] staging: r8188eu: use ieee80211 helper to read the pwr bit Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 3/9] staging: r8188eu: use standard mechanisms for control frames Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 4/9] staging: r8188eu: use standard mechanisms for data frames Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 5/9] staging: r8188eu: use standard mechanisms for qos " Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 6/9] staging: r8188eu: remove unused data frame subtypes Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 7/9] staging: r8188eu: remove unused control " Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 8/9] staging: r8188eu: use ieee80211 macro for sequence number Martin Kaiser
2022-03-27 18:09   ` [PATCH v2 9/9] staging: r8188eu: use ieee80211 define for fragment number Martin Kaiser

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=202203240701.1JNFezRj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.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