From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BFC5C61DA3 for ; Tue, 21 Feb 2023 21:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229676AbjBUVaT (ORCPT ); Tue, 21 Feb 2023 16:30:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbjBUVaO (ORCPT ); Tue, 21 Feb 2023 16:30:14 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FCAD7EC8 for ; Tue, 21 Feb 2023 13:30:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677015009; x=1708551009; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=e1AvhqAmH47az8SqU2RGLxJvxgBybQJt540Qgkz6sK0=; b=lpBwZ38RlPMqHBlwgsuEPg4dMs64p1O58M5U/qmyoZHt/hA16+yd83Ej 3La0kSZDeNLnr0lNa9mWmosHEG9p1v/JyfHsMGOBuJN6n0ugBRJVn43xD xYCSfJARCsVT3kfbbTQy1sazeoJzSgFEu94dZT0ebLqnz5YnutI0aaxM9 aXDv7a80XlNVXRF+qwX1kpxqKvoI6Tc3Jn/vCdKLR95kwAI7Ju1lrjzwE u/b2AqxkshInS4MkO1B/+tnGBzKbbQFBdCtORbym5UticJvtScZC6JuOf jxWON1bbxG+7reMzeMmA1EHXmDjOk2dhDRims8zIMCjHrv4aKlPAqJ3JO Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10628"; a="332760687" X-IronPort-AV: E=Sophos;i="5.97,315,1669104000"; d="scan'208";a="332760687" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2023 13:28:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10628"; a="735627967" X-IronPort-AV: E=Sophos;i="5.97,315,1669104000"; d="scan'208";a="735627967" Received: from lkp-server01.sh.intel.com (HELO eac18b5d7d93) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 21 Feb 2023 13:28:42 -0800 Received: from kbuild by eac18b5d7d93 with local (Exim 4.96) (envelope-from ) id 1pUaBm-0000GH-0D; Tue, 21 Feb 2023 21:28:42 +0000 Date: Wed, 22 Feb 2023 05:27:47 +0800 From: kernel test robot To: Shibo Li , Larry Finger , Florian Schilhabel , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Shibo Li Subject: Re: [PATCH] staging: rtl8712: Fix Sparse warnings in rtl871x_ioctl_linux.c Message-ID: <202302220531.dtbdFw8w-lkp@intel.com> References: <20230220143758.4396-1-zzutcyha@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230220143758.4396-1-zzutcyha@163.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 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