kernel_optimize_test/drivers/net/wan/lmc
Sebastian Andrzej Siewior c2f8c90079 net: wan/lmc: Remove lmc_trace()
lmc_trace() was first introduced in commit e7a392d5158af ("Import
2.3.99pre6-5") and was not touched ever since.

The reason for looking at this was to get rid of the in_interrupt() usage,
but while looking at it the following observations were made:

 - At least lmc_get_stats() (->ndo_get_stats()) is invoked with disabled
   preemption which is not detected by the in_interrupt() check, which
   would cause schedule() to be called from invalid context.

 - The code is hidden behind #ifdef LMC_TRACE which is not defined within
   the kernel and wasn't at the time it was introduced.

 - Three jiffies don't match 50ms. msleep() would be a better match which
   would also avoid the schedule() invocation. But why have it to begin
   with?

 - Nobody would do something like this today. Either netdev_dbg() or
   trace_printk() or a trace event would be used.  If only the functions
   related to this driver are interesting then ftrace can be used with
   filtering.

As it is obviously broken for years, simply remove it.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-29 14:02:54 -07:00
..
lmc_debug.c net: wan/lmc: Remove lmc_trace() 2020-09-29 14:02:54 -07:00
lmc_debug.h net: wan/lmc: Remove lmc_trace() 2020-09-29 14:02:54 -07:00
lmc_ioctl.h
lmc_main.c net: wan/lmc: Remove lmc_trace() 2020-09-29 14:02:54 -07:00
lmc_media.c net: wan/lmc: Remove lmc_trace() 2020-09-29 14:02:54 -07:00
lmc_proto.c net: wan/lmc: Remove lmc_trace() 2020-09-29 14:02:54 -07:00
lmc_proto.h
lmc_var.h
lmc.h
Makefile