kernel/softirq: use BUG_ON conditional instead of BUG in softirq.
PATCH 1/1 kernel/softirq: use BUG_ON conditional instead of BUG in softirq.
Fix BUG() usage to BUG_ON(conditional) usage in softirq.
Found with make coccicheck M=kernel/ on linux-next tag next-20171012.
Signed-off-by Tim Hansen <[email protected]>
--- kernel/softirq.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
kernel/softirq.c +4 -6
@@ -513,9 +513,8 @@ static __latent_entropy void tasklet_action(struct softirq_action *a)if (tasklet_trylock (t)) {if (!atomic_read (&t->count)) { -if (!test_and_clear_bit (TASKLET_STATE_SCHED , - &t->state)) -BUG (); +BUG_ON (!test_and_clear_bit (TASKLET_STATE_SCHED , + &t->state)); t->func (t->data);tasklet_unlock (t);continue ;
@@ -549,9 +548,8 @@ static __latent_entropy void tasklet_hi_action(struct softirq_action *a)if (tasklet_trylock (t)) {if (!atomic_read (&t->count)) { -if (!test_and_clear_bit (TASKLET_STATE_SCHED , - &t->state)) -BUG (); +BUG_ON (!test_and_clear_bit (TASKLET_STATE_SCHED , + &t->state)); t->func (t->data);tasklet_unlock (t);continue ;
Signature · 1 line
2.1.4