All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shibo Li <zzutcyha@163.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Florian Schilhabel <florian.c.schilhabel@googlemail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Shibo Li <zzutcyha@163.com>
Subject: Re: [PATCH] staging: rtl8712: Fix Sparse warnings in rtl871x_ioctl_linux.c
Date: Wed, 22 Feb 2023 13:34:31 +0800	[thread overview]
Message-ID: <202302221320.dttJ7Puv-lkp@intel.com> (raw)
In-Reply-To: <20230220143758.4396-1-zzutcyha@163.com>

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-randconfig-a005 (https://download.01.org/0day-ci/archive/20230222/202302221320.dttJ7Puv-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # 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
        make W=1 O=build_dir ARCH=i386 olddefconfig
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/staging/rtl8712/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302221320.dttJ7Puv-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'r8711_wx_set_essid':
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1272:62: error: 'struct wlan_bssid_ex' has no member named 'configurationInfrastructureMode'
    1272 |                                         if (pnetwork->network.configurationInfrastructureMode
         |                                                              ^
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1274:81: error: request for member 'cur_network' in something not a structure or union
    1274 |                                                 padapter->mlmepriv.assoc_by_rssi.
         |                                                                                 ^


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

      parent reply	other threads:[~2023-02-22  5:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 14:37 [PATCH] staging: rtl8712: Fix Sparse warnings in rtl871x_ioctl_linux.c Shibo Li
2023-02-20 15:03 ` Dan Carpenter
2023-02-20 19:06 ` Philipp Hortmann
2023-02-21 21:27 ` kernel test robot
2023-02-22  5:34 ` kernel test robot [this message]

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=202302221320.dttJ7Puv-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=zzutcyha@163.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.