Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1160003 > unrolled thread

Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions

Started byDavid Miller <davem@davemloft.net>
First post2015-06-07 09:20 +0200
Last post2015-06-07 09:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions David Miller <davem@davemloft.net> - 2015-06-07 09:20 +0200

#1160003 — Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions

FromDavid Miller <davem@davemloft.net>
Date2015-06-07 09:20 +0200
SubjectRe: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions
Message-ID<pyD29-z5-1@gated-at.bofh.it>
From: Nicholas Mc Guire <hofrat@osadl.org>
Date: Sat,  6 Jun 2015 10:41:06 +0200

> API compliance scanning with coccinelle flagged:
> ./drivers/net/wan/dscc4.c:1036:1-33:
>         WARNING: timeout (10) seems HZ dependent
> ./drivers/net/wan/dscc4.c:554:2-34:
>         WARNING: timeout (10) seems HZ dependent
> ./drivers/net/wan/dscc4.c:599:2-34:
>         WARNING: timeout (10) seems HZ dependent
> 
> Numeric constants passed to schedule_timeout_*() make the effective
> timeout HZ dependent which does not seem to be the intent here.
> Fixed up by converting the constant to jiffies with msecs_to_jiffies()
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>

Whoever wrote these things probably wanted whatever this amounts
to when HZ=100, so that is the only valid transformation you can
make to fix this up here.

Otherwise you seriously risk breaking the driver.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web