* [PATCH] net: ipw2x00: Replace NULL comparison with !priv
@ 2018-06-03 11:11 Varsha Rao
2018-06-27 16:05 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Varsha Rao @ 2018-06-03 11:11 UTC (permalink / raw)
To: Stanislav Yakovlev, Kalle Valo, David S. Miller, linux-wireless,
netdev, linux-kernel, Nicholas Mc Guire, Lukas Bulwahn
Cc: Varsha Rao
Remove extra parentheses and replace NULL comparison with !priv, to fix
clang warning of extraneous parentheses and check patch issue. Following
coccinelle script is used to fix it.
@disable is_null,paren@
expression e;
statement s;
@@
if (
- (e==NULL)
+!e
)
s
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index 87a5e414c2f7..7d55bb09413b 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -7112,7 +7112,7 @@ static u32 ipw_qos_get_burst_duration(struct ipw_priv *priv)
{
u32 ret = 0;
- if ((priv == NULL))
+ if (!priv)
return 0;
if (!(priv->ieee->modulation & LIBIPW_OFDM_MODULATION))
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: net: ipw2x00: Replace NULL comparison with !priv
2018-06-03 11:11 [PATCH] net: ipw2x00: Replace NULL comparison with !priv Varsha Rao
@ 2018-06-27 16:05 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-06-27 16:05 UTC (permalink / raw)
To: Varsha Rao
Cc: Stanislav Yakovlev, David S. Miller, linux-wireless, netdev,
linux-kernel, Nicholas Mc Guire, Lukas Bulwahn, Varsha Rao
Varsha Rao <rvarsha016@gmail.com> wrote:
> Remove extra parentheses and replace NULL comparison with !priv, to fix
> clang warning of extraneous parentheses and check patch issue. Following
> coccinelle script is used to fix it.
>
> @disable is_null,paren@
> expression e;
> statement s;
> @@
> if (
> - (e==NULL)
> +!e
> )
> s
>
> Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Patch applied to wireless-drivers-next.git, thanks.
4e5f881d430a net: ipw2x00: Replace NULL comparison with !priv
--
https://patchwork.kernel.org/patch/10445241/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-27 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-03 11:11 [PATCH] net: ipw2x00: Replace NULL comparison with !priv Varsha Rao
2018-06-27 16:05 ` Kalle Valo
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).