* [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c
@ 2018-09-21 17:26 Karthik Nishanth
2018-09-22 12:44 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Karthik Nishanth @ 2018-09-21 17:26 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, devel, linux-kernel, Karthik Nishanth
The member regd of the struct rtl_priv is true in a boolean context.
drivers/staging/rtlwifi/regd.c:413:27: warning: address of 'rtlpriv->regd' will always
evaluate to 'true' [-Wpointer-bool-conversion]
if (!wiphy || !&rtlpriv->regd)
~ ~~~~~~~~~^~~~
1 warning generated.
Link: https://github.com/ClangBuiltLinux/linux/issues/170
Signed-off-by: Karthik Nishanth <nishanthkarthik@live.com>
---
drivers/staging/rtlwifi/regd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtlwifi/regd.c b/drivers/staging/rtlwifi/regd.c
index 3afd206ce4b1..5213ca771175 100644
--- a/drivers/staging/rtlwifi/regd.c
+++ b/drivers/staging/rtlwifi/regd.c
@@ -410,7 +410,7 @@ int rtl_regd_init(struct ieee80211_hw *hw,
struct wiphy *wiphy = hw->wiphy;
struct country_code_to_enum_rd *country = NULL;
- if (!wiphy || !&rtlpriv->regd)
+ if (!wiphy)
return -EINVAL;
/* init country_code from efuse channel plan */
--
2.19.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c
2018-09-21 17:26 [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c Karthik Nishanth
@ 2018-09-22 12:44 ` Dan Carpenter
2018-09-22 13:40 ` Karthik Nishanth
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2018-09-22 12:44 UTC (permalink / raw)
To: Karthik Nishanth; +Cc: gregkh, devel, linux-kernel, Larry.Finger
The subject needs a subsystem prefix. It's also slightly long.
[PATCH] Staging: rtlwifi: remove unnecessary NULL check
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c
2018-09-22 12:44 ` Dan Carpenter
@ 2018-09-22 13:40 ` Karthik Nishanth
2018-09-22 14:04 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Karthik Nishanth @ 2018-09-22 13:40 UTC (permalink / raw)
To: Dan Carpenter; +Cc: gregkh, devel, linux-kernel, Larry.Finger
Do I submit a new patch with the modified subject?
On Sat, Sep 22, 2018 at 03:44:32PM +0300, Dan Carpenter wrote:
>The subject needs a subsystem prefix. It's also slightly long.
>
>[PATCH] Staging: rtlwifi: remove unnecessary NULL check
>
>regards,
>dan carpenter
>
Karthik Nishanth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c
2018-09-22 13:40 ` Karthik Nishanth
@ 2018-09-22 14:04 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-09-22 14:04 UTC (permalink / raw)
To: Karthik Nishanth; +Cc: gregkh, devel, linux-kernel, Larry.Finger
On Sat, Sep 22, 2018 at 01:40:19PM +0000, Karthik Nishanth wrote:
> Do I submit a new patch with the modified subject?
>
Yeah. Put [PATCH v2] in the subject and then at the end of the patch
description put:
Signed-off-by: Your Name <email>
---
v2: changed the subject.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-22 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-21 17:26 [PATCH] Fix clang warning -Wpointer-bool-conversion by removing unnecessary check in regd.c Karthik Nishanth
2018-09-22 12:44 ` Dan Carpenter
2018-09-22 13:40 ` Karthik Nishanth
2018-09-22 14:04 ` Dan Carpenter
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).