From: heshuai1 <hexiaoshuaishuai@gmail.com>
To: gregkh@linuxfoundation.org, vkor@vkten.in, nishkadg.linux@gmail.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
heshuai1 <heshuai1@xiaomi.com>
Subject: [PATCH] rtl8723bs: core: fix a coding style error
Date: Fri, 15 May 2020 17:40:44 +0800 [thread overview]
Message-ID: <1589535644-6820-1-git-send-email-heshuai1@xiaomi.com> (raw)
Fix this coding style error reported by checkpatch.pl:
ERROR: do not use assignment in if condition
#1120: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:1120::
+ if ((addr = of_get_property(np, "local-mac-address", &len)) &&
Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index ca98274..06be1d4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -1117,8 +1117,8 @@ void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr)
}
if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {
- if ((addr = of_get_property(np, "local-mac-address", &len)) &&
- len == ETH_ALEN) {
+ addr = of_get_property(np, "local-mac-address", &len);
+ if (addr && len == ETH_ALEN) {
ether_addr_copy(mac_addr, addr);
} else {
eth_random_addr(mac_addr);
--
2.7.4
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next reply other threads:[~2020-05-15 9:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 9:40 heshuai1 [this message]
2020-05-15 10:05 ` [PATCH] rtl8723bs: core: fix a coding style error Greg KH
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=1589535644-6820-1-git-send-email-heshuai1@xiaomi.com \
--to=hexiaoshuaishuai@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=heshuai1@xiaomi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nishkadg.linux@gmail.com \
--cc=vkor@vkten.in \
/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;
as well as URLs for NNTP newsgroup(s).