Commit 581b4945 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8723bs: core: Remove variable change_priority

Remove local variable change_priority, as it takes the value of the
argument priority; as both of these variables are of type u8, priority
can be modified without changing the value of its copy at the call site.
Issue found with Coccinelle.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 535e5a9b
...@@ -625,13 +625,11 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p ...@@ -625,13 +625,11 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p
u8 qos_acm(u8 acm_mask, u8 priority) u8 qos_acm(u8 acm_mask, u8 priority)
{ {
u8 change_priority = priority;
switch (priority) { switch (priority) {
case 0: case 0:
case 3: case 3:
if (acm_mask & BIT(1)) if (acm_mask & BIT(1))
change_priority = 1; priority = 1;
break; break;
case 1: case 1:
case 2: case 2:
...@@ -639,19 +637,19 @@ u8 qos_acm(u8 acm_mask, u8 priority) ...@@ -639,19 +637,19 @@ u8 qos_acm(u8 acm_mask, u8 priority)
case 4: case 4:
case 5: case 5:
if (acm_mask & BIT(2)) if (acm_mask & BIT(2))
change_priority = 0; priority = 0;
break; break;
case 6: case 6:
case 7: case 7:
if (acm_mask & BIT(3)) if (acm_mask & BIT(3))
change_priority = 5; priority = 5;
break; break;
default: default:
DBG_871X("qos_acm(): invalid pattrib->priority: %d!!!\n", priority); DBG_871X("qos_acm(): invalid pattrib->priority: %d!!!\n", priority);
break; break;
} }
return change_priority; return priority;
} }
static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib) static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
......
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