From f5e5139b293ffd63cfaa4f31dcb3863ee0b7653a Mon Sep 17 00:00:00 2001 From: Rostislav Lisovy Date: Tue, 30 Aug 2011 11:24:09 +0200 Subject: [PATCH] Unified can_id and can_mask variable names. --- net/sched/cls_canprio.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/net/sched/cls_canprio.c b/net/sched/cls_canprio.c index 90ea58391a1..bba0f4dd4fa 100644 --- a/net/sched/cls_canprio.c +++ b/net/sched/cls_canprio.c @@ -89,21 +89,21 @@ struct canprio_filter { * ---------------------------------------------------------------------------- */ -static void canprio_sff_match_add(struct canprio_rules *rls, u32 canid, u32 mask) +static void canprio_sff_match_add(struct canprio_rules *rls, u32 can_id, u32 can_mask) { int i; printk("%s() invoked\n", __FUNCTION__); - mask &= CAN_SFF_MASK; - canid &= mask; + can_mask &= CAN_SFF_MASK; + can_id &= can_mask; - if (mask == CAN_SFF_MASK) { - set_bit(canid, rls->match_sff); + if (can_mask == CAN_SFF_MASK) { + set_bit(can_id, rls->match_sff); return; } /* Add record (set bit to 1) for each ID that conforms particular rule */ for (i = 0; i <= CAN_SFF_MASK; i++) { - if ((i & mask) == canid) + if ((i & can_mask) == can_id) set_bit(i, rls->match_sff); } } @@ -136,28 +136,28 @@ static int canprio_classify(struct sk_buff *skb, struct tcf_proto *tp, { struct canprio_head *head = (struct canprio_head *)tp->root; struct canprio_filter *f; - u32 canid; + u32 can_id; int i; printk(" canprio_classify() invoked\n"); - canid = (u32)canprio_get_id(skb); + can_id = (u32)canprio_get_id(skb); list_for_each_entry(f, &head->flist, link) { bool match = false; - if (canid & CAN_EFF_FLAG) { - canid &= CAN_EFF_MASK; + if (can_id & CAN_EFF_FLAG) { + can_id &= CAN_EFF_MASK; for (i = 0; i < f->rules->eff_rules_count; i++) { if ((f->rules->rules_raw[i].can_id & f->rules->rules_raw[i].can_mask & CAN_EFF_MASK) == - (canid & f->rules->rules_raw[i].can_mask & CAN_EFF_MASK)) { + (can_id & f->rules->rules_raw[i].can_mask & CAN_EFF_MASK)) { match = true; break; } } } else { - match = test_bit(canid, f->rules->match_sff); + match = test_bit(can_id, f->rules->match_sff); } //if (f->rules->inv_match_en) @@ -165,7 +165,7 @@ static int canprio_classify(struct sk_buff *skb, struct tcf_proto *tp, if (match) { *res = f->res; - printk( " canprio_classify() match ok: ID 0x%x\n", canid); + printk( " canprio_classify() match ok: ID 0x%x\n", can_id); return TC_POLICE_OK; } } -- 2.39.2