Skip to content

Commit

Permalink
Merge branch 'kill_tasklet_hi_enable'
Browse files Browse the repository at this point in the history
Quentin Lambert says:

====================
Remove redundant function

tasklet_hi_enable and tasklet_enable are redundant. Since
tasklet_hi_enable is used only 6 times in 1 file, the first
patch changes calls to the function with calls to tasklet_enable.

The second patch removes tasklet_hi_enable definition.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Dec 12, 2014
2 parents a169758 + 7142637 commit d717e90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 6 additions & 6 deletions drivers/net/ethernet/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,8 +1364,8 @@ jme_link_change_tasklet(unsigned long arg)
jme_free_rx_resources(jme);
out_enable_tasklet:
tasklet_enable(&jme->txclean_task);
tasklet_hi_enable(&jme->rxclean_task);
tasklet_hi_enable(&jme->rxempty_task);
tasklet_enable(&jme->rxclean_task);
tasklet_enable(&jme->rxempty_task);
out:
atomic_inc(&jme->link_changing);
}
Expand Down Expand Up @@ -2408,8 +2408,8 @@ static inline void jme_resume_rx(struct jme_adapter *jme)
if (test_bit(JME_FLAG_POLL, &jme->flags)) {
JME_NAPI_ENABLE(jme);
} else {
tasklet_hi_enable(&jme->rxclean_task);
tasklet_hi_enable(&jme->rxempty_task);
tasklet_enable(&jme->rxclean_task);
tasklet_enable(&jme->rxempty_task);
}
dpi->cur = PCC_P1;
dpi->attempt = PCC_P1;
Expand Down Expand Up @@ -3290,8 +3290,8 @@ jme_suspend(struct device *dev)
}

tasklet_enable(&jme->txclean_task);
tasklet_hi_enable(&jme->rxclean_task);
tasklet_hi_enable(&jme->rxempty_task);
tasklet_enable(&jme->rxclean_task);
tasklet_enable(&jme->rxempty_task);

jme_powersave_phy(jme);

Expand Down
6 changes: 0 additions & 6 deletions include/linux/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,6 @@ static inline void tasklet_enable(struct tasklet_struct *t)
atomic_dec(&t->count);
}

static inline void tasklet_hi_enable(struct tasklet_struct *t)
{
smp_mb__before_atomic();
atomic_dec(&t->count);
}

extern void tasklet_kill(struct tasklet_struct *t);
extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
extern void tasklet_init(struct tasklet_struct *t,
Expand Down

0 comments on commit d717e90

Please sign in to comment.