[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f0f2fab1-8c4a-bc7f-2de1-9a78a3445759@gmail.com>
Date: Mon, 20 Feb 2023 20:06:13 +0100
From: Philipp Hortmann <philipp.g.hortmann@...il.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
Subject: Re: [PATCH] staging: rtl8712: Fix Sparse warnings in
rtl871x_ioctl_linux.c
On 2/20/23 15:37, Shibo Li wrote:
> This patch fixes the following warning in rtl871x_ioctl_linux.c
>
> WARNING: Avoid multiple line dereference - prefer 'pnetwork->network.InfrastructureMode'
> + if (pnetwork->network.
> + InfrastructureMode
>
> WARNING: Avoid multiple line dereference - prefer 'padapter->mlmepriv.cur_network.network'
> + padapter->mlmepriv.
> + cur_network.network.
>
> WARNING: Avoid multiple line dereference - prefer 'cur_network.network.InfrastructureMode'
> + cur_network.network.
> + InfrastructureMode)
>
> Signed-off-by: Shibo Li <zzutcyha@....com>
> ---
> drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> index 36f6904d25ab..6673befeb2f0 100644
> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> @@ -1268,14 +1268,11 @@ static int r8711_wx_set_essid(struct net_device *dev,
> if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength))
> && (pnetwork->network.Ssid.SsidLength ==
> ndis_ssid.SsidLength)) {
> - if (check_fwstate(pmlmepriv,
> - WIFI_ADHOC_STATE)) {
> - if (pnetwork->network.
> - InfrastructureMode
> + if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
> + if (pnetwork->network.configurationInfrastructureMode
> !=
> - padapter->mlmepriv.
> - cur_network.network.
> - InfrastructureMode)
> + padapter->mlmepriv.assoc_by_rssi.
> + cur_network.network.InfrastructureMode)
> continue;
> }
>
I get a compilation error when compiling with this patch.
drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function
‘r8711_wx_set_essid’:
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1272:27: error: ‘struct
wlan_bssid_ex’ has no member named ‘configurationInfrastructureMode’
1272 | if (pnetwork->network.configurationInfrastructureMode
| ^
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1274:39: error: request
for member ‘cur_network’ in something not a structure or union
1274 | padapter->mlmepriv.assoc_by_rssi.
| ^
make[1]: *** [scripts/Makefile.build:252:
drivers/staging/rtl8712/rtl871x_ioctl_linux.o] Error 1
make: *** [Makefile:2021: drivers/staging/rtl8712] Error 2
make: Leaving directory '/home/kernel/Documents/git/kernels/staging'
Bye Philipp
Powered by blists - more mailing lists