[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1512071053490.2520@hadrien>
Date: Mon, 7 Dec 2015 10:55:33 +0100 (CET)
From: Julia Lawall <julia.lawall@...6.fr>
To: "Kalle Valo <kvalo@...rom.com> Kalle Valo" <kvalo@...rom.com>
cc: "Luis R. Rodriguez" <mcgrof@...il.com>,
linux-wireless@...r.kernel.org, kbuild-all@...org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] prism54: fix compare_const_fl.cocci warnings (fwd)
Move constants to the right of binary operators.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---
It looks a little nicer to me because n is the thing we care about.
oid_mgt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/net/wireless/intersil/prism54/oid_mgt.c
+++ b/drivers/net/wireless/intersil/prism54/oid_mgt.c
@@ -424,7 +424,7 @@ mgt_set_request(islpci_private *priv, en
void *cache, *_data = data;
u32 oid;
- BUG_ON(OID_NUM_LAST <= n);
+ BUG_ON(n >= OID_NUM_LAST);
BUG_ON(extra > isl_oid[n].range);
if (!priv->mib)
@@ -485,7 +485,7 @@ mgt_set_varlen(islpci_private *priv, enu
int dlen;
u32 oid;
- BUG_ON(OID_NUM_LAST <= n);
+ BUG_ON(n >= OID_NUM_LAST);
dlen = isl_oid[n].size;
oid = isl_oid[n].oid;
@@ -524,7 +524,7 @@ mgt_get_request(islpci_private *priv, en
void *cache, *_res = NULL;
u32 oid;
- BUG_ON(OID_NUM_LAST <= n);
+ BUG_ON(n >= OID_NUM_LAST);
BUG_ON(extra > isl_oid[n].range);
res->ptr = NULL;
@@ -626,7 +626,7 @@ mgt_commit_list(islpci_private *priv, en
void
mgt_set(islpci_private *priv, enum oid_num_t n, void *data)
{
- BUG_ON(OID_NUM_LAST <= n);
+ BUG_ON(n >= OID_NUM_LAST);
BUG_ON(priv->mib[n] == NULL);
memcpy(priv->mib[n], data, isl_oid[n].size);
@@ -636,7 +636,7 @@ mgt_set(islpci_private *priv, enum oid_n
void
mgt_get(islpci_private *priv, enum oid_num_t n, void *res)
{
- BUG_ON(OID_NUM_LAST <= n);
+ BUG_ON(n >= OID_NUM_LAST);
BUG_ON(priv->mib[n] == NULL);
BUG_ON(res == NULL);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists