[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202302220531.dtbdFw8w-lkp@intel.com>
Date: Wed, 22 Feb 2023 05:27:47 +0800
From: kernel test robot <lkp@...el.com>
To: Shibo Li <zzutcyha@....com>,
Larry Finger <Larry.Finger@...inger.net>,
Florian Schilhabel <florian.c.schilhabel@...glemail.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Shibo Li <zzutcyha@....com>
Subject: Re: [PATCH] staging: rtl8712: Fix Sparse warnings in
rtl871x_ioctl_linux.c
Hi Shibo,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Shibo-Li/staging-rtl8712-Fix-Sparse-warnings-in-rtl871x_ioctl_linux-c/20230220-224057
patch link: https://lore.kernel.org/r/20230220143758.4396-1-zzutcyha%40163.com
patch subject: [PATCH] staging: rtl8712: Fix Sparse warnings in rtl871x_ioctl_linux.c
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20230222/202302220531.dtbdFw8w-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/7117082894534ef14c409d6a9070fa051a84f619
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Shibo-Li/staging-rtl8712-Fix-Sparse-warnings-in-rtl871x_ioctl_linux-c/20230220-224057
git checkout 7117082894534ef14c409d6a9070fa051a84f619
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302220531.dtbdFw8w-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1272:28: error: no member named 'configurationInfrastructureMode' in 'struct wlan_bssid_ex'
if (pnetwork->network.configurationInfrastructureMode
~~~~~~~~~~~~~~~~~ ^
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1274:39: error: member reference base type 'uint' (aka 'unsigned int') is not a structure or union
padapter->mlmepriv.assoc_by_rssi.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
2 errors generated.
vim +1272 drivers/staging/rtl8712/rtl871x_ioctl_linux.c
1218
1219 /* set ssid flow
1220 * s1. set_802_11_infrastructure_mode()
1221 * s2. set_802_11_authenticaion_mode()
1222 * s3. set_802_11_encryption_mode()
1223 * s4. set_802_11_ssid()
1224 *
1225 * This function intends to handle the Set ESSID command.
1226 * Currently, the request comes via the Wireless Extensions' SIOCSIWESSID ioctl.
1227 *
1228 * For this operation to succeed, there is no need for the interface to be Up.
1229 *
1230 */
1231 static int r8711_wx_set_essid(struct net_device *dev,
1232 struct iw_request_info *a,
1233 union iwreq_data *wrqu, char *extra)
1234 {
1235 struct _adapter *padapter = netdev_priv(dev);
1236 struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
1237 struct __queue *queue = &pmlmepriv->scanned_queue;
1238 struct wlan_network *pnetwork = NULL;
1239 enum NDIS_802_11_AUTHENTICATION_MODE authmode;
1240 struct ndis_802_11_ssid ndis_ssid;
1241 u8 *dst_ssid, *src_ssid;
1242 struct list_head *phead;
1243 u32 len;
1244
1245 if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
1246 return -EBUSY;
1247 if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
1248 return 0;
1249 if (wrqu->essid.length > IW_ESSID_MAX_SIZE)
1250 return -E2BIG;
1251 authmode = padapter->securitypriv.ndisauthtype;
1252 if (wrqu->essid.flags && wrqu->essid.length) {
1253 len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ?
1254 wrqu->essid.length : IW_ESSID_MAX_SIZE;
1255 memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
1256 ndis_ssid.SsidLength = len;
1257 memcpy(ndis_ssid.Ssid, extra, len);
1258 src_ssid = ndis_ssid.Ssid;
1259 phead = &queue->queue;
1260 pmlmepriv->pscanned = phead->next;
1261 while (1) {
1262 if (end_of_queue_search(phead, pmlmepriv->pscanned))
1263 break;
1264 pnetwork = container_of(pmlmepriv->pscanned,
1265 struct wlan_network, list);
1266 pmlmepriv->pscanned = pmlmepriv->pscanned->next;
1267 dst_ssid = pnetwork->network.Ssid.Ssid;
1268 if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength))
1269 && (pnetwork->network.Ssid.SsidLength ==
1270 ndis_ssid.SsidLength)) {
1271 if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
> 1272 if (pnetwork->network.configurationInfrastructureMode
1273 !=
> 1274 padapter->mlmepriv.assoc_by_rssi.
1275 cur_network.network.InfrastructureMode)
1276 continue;
1277 }
1278
1279 r8712_set_802_11_infrastructure_mode(
1280 padapter,
1281 pnetwork->network.InfrastructureMode);
1282 break;
1283 }
1284 }
1285 r8712_set_802_11_authentication_mode(padapter, authmode);
1286 r8712_set_802_11_ssid(padapter, &ndis_ssid);
1287 }
1288 return -EINPROGRESS;
1289 }
1290
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists