static inline int __type_cmp(const void *key, const struct rb_node *b)
{
- struct intel_uncore_discovery_type *type_b = __node_2_type(b);
+ const struct intel_uncore_discovery_type *type_b = __node_2_type(b);
const u16 *type_id = key;
if (type_b->type > *type_id)
static inline int pmu_idx_cmp(const void *key, const struct rb_node *b)
{
- struct intel_uncore_discovery_unit *unit;
+ const struct intel_uncore_discovery_unit *unit;
const unsigned int *id = key;
unit = rb_entry(b, struct intel_uncore_discovery_unit, node);
static inline bool unit_less(struct rb_node *a, const struct rb_node *b)
{
- struct intel_uncore_discovery_unit *a_node, *b_node;
+ const struct intel_uncore_discovery_unit *a_node, *b_node;
a_node = rb_entry(a, struct intel_uncore_discovery_unit, node);
b_node = rb_entry(b, struct intel_uncore_discovery_unit, node);