From: Vihas Makwana <makvihas@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Straube <straube.linux@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>,
Pavel Skripkin <paskripkin@gmail.com>,
Vihas Makwana <makvihas@gmail.com>
Subject: [PATCH 3/3] staging: r8188eu: fix checkpatch.pl warnings in rtw_wlan_util
Date: Mon, 16 May 2022 22:33:06 +0530 [thread overview]
Message-ID: <20220516170306.6008-4-makvihas@gmail.com> (raw)
In-Reply-To: <20220516170306.6008-1-makvihas@gmail.com>
Refactor the code to fix following warnings:
WARNING: Comparisons should place the constant on the right side of the test
CHECK: Comparison to NULL could be written "p"
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 27035eac6..3f4456901 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -962,7 +962,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
else
hidden_ssid = false;
- if ((NULL != p) && (false == hidden_ssid && (*(p + 1)))) {
+ if (p && (!hidden_ssid && (*(p + 1)))) {
memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1));
bssid->Ssid.SsidLength = *(p + 1);
} else {
--
2.30.2
next prev parent reply other threads:[~2022-05-16 17:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 17:03 [PATCH 0/3] staging: r8188eu: fix checkpatch.pl warnings Vihas Makwana
2022-05-16 17:03 ` [PATCH 1/3] staging: r8188eu: fix checkpatch.pl warnings in rtw_p2p Vihas Makwana
2022-05-16 17:03 ` [PATCH 2/3] staging: r8188eu: fix checkpatch.pl warnings in rtw_pwrctrl Vihas Makwana
2022-05-16 19:45 ` Pavel Skripkin
2022-05-17 13:51 ` Vihas Makwana
2022-05-16 17:03 ` Vihas Makwana [this message]
2022-05-16 19:49 ` [PATCH 0/3] staging: r8188eu: fix checkpatch.pl warnings Pavel Skripkin
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=20220516170306.6008-4-makvihas@gmail.com \
--to=makvihas@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.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 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®