Sparse gives "incompatible types in comparison expression (different
address spaces)" warning messages. Fix this by add rcu_dereference()
wrappers.
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
* </Note>
*/
for (i = 0; i < ma->count; i++)
* </Note>
*/
for (i = 0; i < ma->count; i++)
- if (mask == ma->masks[i]) {
+ if (mask == ovsl_dereference(ma->masks[i])) {
struct sw_flow_mask *last;
struct sw_flow_mask *last;
- last = ma->masks[ma->count - 1];
+ last = ovsl_dereference(ma->masks[ma->count - 1]);
rcu_assign_pointer(ma->masks[i], last);
ma->count--;
break;
rcu_assign_pointer(ma->masks[i], last);
ma->count--;
break;
/* Remove the deleted mask pointers from the invalid section. */
for (i = ma->count; i < ma->max; i++)
/* Remove the deleted mask pointers from the invalid section. */
for (i = ma->count; i < ma->max; i++)
- if (mask == ma->masks[i])
+ if (mask == ovsl_dereference(ma->masks[i]))
RCU_INIT_POINTER(ma->masks[i], NULL);
}
RCU_INIT_POINTER(ma->masks[i], NULL);
}