atm: use msecs_to_jiffies for conversions
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 8 Jun 2015 19:16:28 +0000 (21:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jun 2015 22:48:45 +0000 (15:48 -0700)
API compliance scanning with coccinelle flagged:
./drivers/atm/iphase.c:2621:4-20:
        WARNING: timeout (50) seems HZ dependent

Numeric constants passed to schedule_timeout() make the effective
timeout HZ dependent which does not seem intended.
Fixed up by converting the constant to jiffies with msecs_to_jiffies()
As this driver was introduced in the early 2.3 series it is most
likely assuming HZ=100 so the constant 50 is converted to 500ms.

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

index 924f8e26789dbb3efa4bd911f2d5f3428b6c5ecb..65e65903faa072f5d9f8897bf9052112ad624866 100644 (file)
@@ -2618,7 +2618,7 @@ static void ia_close(struct atm_vcc *vcc)
         if (vcc->qos.txtp.traffic_class != ATM_NONE) {
            iadev->close_pending++;
           prepare_to_wait(&iadev->timeout_wait, &wait, TASK_UNINTERRUPTIBLE);
-          schedule_timeout(50);
+          schedule_timeout(msecs_to_jiffies(500));
           finish_wait(&iadev->timeout_wait, &wait);
            spin_lock_irqsave(&iadev->tx_lock, flags); 
            while((skb = skb_dequeue(&iadev->tx_backlog))) {