From: Shibo Li <zzutcyha@163.com>
To: 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: Shibo Li <zzutcyha@163.com>
Subject: [PATCH] staging: rtl8712: Fix Sparse warnings in rtl871x_ioctl_linux.c
Date: Mon, 20 Feb 2023 14:37:58 +0000 [thread overview]
Message-ID: <20230220143758.4396-1-zzutcyha@163.com> (raw)
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@163.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;
}
--
2.39.2
next reply other threads:[~2023-02-20 14:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 14:37 Shibo Li [this message]
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
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=20230220143758.4396-1-zzutcyha@163.com \
--to=zzutcyha@163.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 \
/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
all inboxes | Powered by JetHome®