Commit 0deee7aa authored by Jiapeng Zhong's avatar Jiapeng Zhong Committed by Jakub Kicinski

taprio: boolean values to a bool variable

Fix the following coccicheck warnings:

./net/sched/sch_taprio.c:393:3-16: WARNING: Assignment of 0/1 to bool
variable.

./net/sched/sch_taprio.c:375:2-15: WARNING: Assignment of 0/1 to bool
variable.

./net/sched/sch_taprio.c:244:4-19: WARNING: Assignment of 0/1 to bool
variable.
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Link: https://lore.kernel.org/r/1610958662-71166-1-git-send-email-abaci-bugfix@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 719fc6b7
...@@ -241,7 +241,7 @@ static struct sched_entry *find_entry_to_transmit(struct sk_buff *skb, ...@@ -241,7 +241,7 @@ static struct sched_entry *find_entry_to_transmit(struct sk_buff *skb,
/* Here, we are just trying to find out the /* Here, we are just trying to find out the
* first available interval in the next cycle. * first available interval in the next cycle.
*/ */
entry_available = 1; entry_available = true;
entry_found = entry; entry_found = entry;
*interval_start = ktime_add_ns(curr_intv_start, cycle); *interval_start = ktime_add_ns(curr_intv_start, cycle);
*interval_end = ktime_add_ns(curr_intv_end, cycle); *interval_end = ktime_add_ns(curr_intv_end, cycle);
...@@ -372,7 +372,7 @@ static long get_packet_txtime(struct sk_buff *skb, struct Qdisc *sch) ...@@ -372,7 +372,7 @@ static long get_packet_txtime(struct sk_buff *skb, struct Qdisc *sch)
packet_transmit_time = length_to_duration(q, len); packet_transmit_time = length_to_duration(q, len);
do { do {
sched_changed = 0; sched_changed = false;
entry = find_entry_to_transmit(skb, sch, sched, admin, entry = find_entry_to_transmit(skb, sch, sched, admin,
minimum_time, minimum_time,
...@@ -390,7 +390,7 @@ static long get_packet_txtime(struct sk_buff *skb, struct Qdisc *sch) ...@@ -390,7 +390,7 @@ static long get_packet_txtime(struct sk_buff *skb, struct Qdisc *sch)
if (admin && admin != sched && if (admin && admin != sched &&
ktime_after(txtime, admin->base_time)) { ktime_after(txtime, admin->base_time)) {
sched = admin; sched = admin;
sched_changed = 1; sched_changed = true;
continue; continue;
} }
......
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