cosa: use msecs_to_jiffies for conversions
authorNicholas Mc Guire <hofrat@osadl.org>
Sat, 6 Jun 2015 07:51:51 +0000 (09:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jun 2015 06:45:39 +0000 (23:45 -0700)
API compliance scanning with coccinelle flagged:
./drivers/net/wan/cosa.c:520:2-18: WARNING:
timeout (30) seems HZ dependent

Numeric constants passed to schedule_timeout() make the effective
timeout HZ dependent which makes little sense in a device probe.
Fixed up by converting the constant to jiffies with msecs_to_jiffies()

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/cosa.c

index bcfa01add7cc479ca25d5f2f198f9623fc966415..7193b7304fdd3ed4b69c0125732d4a024d4a4b36 100644 (file)
@@ -517,7 +517,7 @@ static int cosa_probe(int base, int irq, int dma)
                 */
                set_current_state(TASK_INTERRUPTIBLE);
                cosa_putstatus(cosa, SR_TX_INT_ENA);
-               schedule_timeout(30);
+               schedule_timeout(msecs_to_jiffies(300));
                irq = probe_irq_off(irqs);
                /* Disable all IRQs from the card */
                cosa_putstatus(cosa, 0);