Netdev List
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr@hofr.at>
To: David Miller <davem@davemloft.net>
Cc: hofrat@osadl.org, romieu@fr.zoreil.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions
Date: Sun, 7 Jun 2015 10:31:37 +0200	[thread overview]
Message-ID: <20150607083137.GB9670@opentech.at> (raw)
In-Reply-To: <20150607.001351.1615444562432115091.davem@davemloft.net>

On Sun, 07 Jun 2015, David Miller wrote:

> 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.

I did not find dscc4 in the 2.2 series of kernels so it does not predate
configurable HZ - or do you mean simply that increasing the timeout
here should be side-effect free and thus the larger of the values
should be taken ? - though that would imply that it is possibly now 
broken for HZ=1000. 

Will fix it up to 10 == 100ms and fix the patch documentation.

thx!
hofrat

  reply	other threads:[~2015-06-07  8:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-06  8:41 [PATCH] wan: dscc4: use msecs_to_jiffies for conversions Nicholas Mc Guire
2015-06-07  7:13 ` David Miller
2015-06-07  8:31   ` Nicholas Mc Guire [this message]
2015-06-07  8:32   ` Francois Romieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150607083137.GB9670@opentech.at \
    --to=der.herr@hofr.at \
    --cc=davem@davemloft.net \
    --cc=hofrat@osadl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox