Commit 6b904f62 authored by Julia Lawall's avatar Julia Lawall Committed by Kalle Valo

prism54: fix compare_const_fl.cocci warnings

Move constants to the right of binary operators.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent fc30c305
...@@ -424,7 +424,7 @@ mgt_set_request(islpci_private *priv, enum oid_num_t n, int extra, void *data) ...@@ -424,7 +424,7 @@ mgt_set_request(islpci_private *priv, enum oid_num_t n, int extra, void *data)
void *cache, *_data = data; void *cache, *_data = data;
u32 oid; u32 oid;
BUG_ON(OID_NUM_LAST <= n); BUG_ON(n >= OID_NUM_LAST);
BUG_ON(extra > isl_oid[n].range); BUG_ON(extra > isl_oid[n].range);
if (!priv->mib) if (!priv->mib)
...@@ -485,7 +485,7 @@ mgt_set_varlen(islpci_private *priv, enum oid_num_t n, void *data, int extra_len ...@@ -485,7 +485,7 @@ mgt_set_varlen(islpci_private *priv, enum oid_num_t n, void *data, int extra_len
int dlen; int dlen;
u32 oid; u32 oid;
BUG_ON(OID_NUM_LAST <= n); BUG_ON(n >= OID_NUM_LAST);
dlen = isl_oid[n].size; dlen = isl_oid[n].size;
oid = isl_oid[n].oid; oid = isl_oid[n].oid;
...@@ -524,7 +524,7 @@ mgt_get_request(islpci_private *priv, enum oid_num_t n, int extra, void *data, ...@@ -524,7 +524,7 @@ mgt_get_request(islpci_private *priv, enum oid_num_t n, int extra, void *data,
void *cache, *_res = NULL; void *cache, *_res = NULL;
u32 oid; u32 oid;
BUG_ON(OID_NUM_LAST <= n); BUG_ON(n >= OID_NUM_LAST);
BUG_ON(extra > isl_oid[n].range); BUG_ON(extra > isl_oid[n].range);
res->ptr = NULL; res->ptr = NULL;
...@@ -626,7 +626,7 @@ mgt_commit_list(islpci_private *priv, enum oid_num_t *l, int n) ...@@ -626,7 +626,7 @@ mgt_commit_list(islpci_private *priv, enum oid_num_t *l, int n)
void void
mgt_set(islpci_private *priv, enum oid_num_t n, void *data) 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); BUG_ON(priv->mib[n] == NULL);
memcpy(priv->mib[n], data, isl_oid[n].size); memcpy(priv->mib[n], data, isl_oid[n].size);
...@@ -636,7 +636,7 @@ mgt_set(islpci_private *priv, enum oid_num_t n, void *data) ...@@ -636,7 +636,7 @@ mgt_set(islpci_private *priv, enum oid_num_t n, void *data)
void void
mgt_get(islpci_private *priv, enum oid_num_t n, void *res) 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(priv->mib[n] == NULL);
BUG_ON(res == NULL); BUG_ON(res == NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment