linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: ksummit-discuss@lists.linuxfoundation.org
Cc: Kalle Valo <kvalo@codeaurora.org>, Joe Perches <joe@perches.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Sasha Levin <levinsasha928@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [Ksummit-discuss] checkkpatch (in)sanity ?
Date: Mon, 29 Aug 2016 23:00:35 +0200	[thread overview]
Message-ID: <201608292300.35292.arnd@arndb.de> (raw)
In-Reply-To: <87lgzfihel.fsf@kamboji.qca.qualcomm.com>

On Monday 29 August 2016, Kalle Valo wrote:
> MSLEEP: I think this is just noise, we don't care if it's actually 20 ms
> even if ask for 10 ms. That's the minimum time to wait, not the maximum
> (from our/HW point of view).
> 
> drivers/net/wireless/ath/ath10k/ahb.c:422: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> drivers/net/wireless/ath/ath10k/ahb.c:427: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> drivers/net/wireless/ath/ath10k/ahb.c:432: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> drivers/net/wireless/ath/ath10k/ahb.c:437: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> drivers/net/wireless/ath/ath10k/ahb.c:442: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> drivers/net/wireless/ath/ath10k/pci.c:2244: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> drivers/net/wireless/ath/ath10k/pci.c:2251: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> drivers/net/wireless/ath/ath10k/pci.c:2275: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> 

I've seen way too many patches addressing this warning in various ways that
do not improve readability or behavior of the driver. Typically a driver
calls "msleep(1)" in a loop as a way to poll for an event that will happen
at some point in the future but that generates no IRQ or other event we
can wait for, the stuff that used to be handled with "yield" a long time
ago.

Now every third caller of usleep_range() uses '1000' as the minimum time
and an arbitrary upper bound.

	Arnd

  parent reply	other threads:[~2016-08-29 21:00 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27 20:40 checkkpatch (in)sanity ? Joe Perches
2016-08-28  1:06 ` Levin, Alexander
2016-08-28  1:42   ` Joe Perches
2016-08-28  2:20     ` Joe Perches
2016-08-28  2:47     ` Levin, Alexander
2016-08-28 17:15       ` Joe Perches
2016-08-28 17:59         ` Greg KH
2016-08-28 22:37         ` Levin, Alexander
2016-08-28 23:20           ` Joe Perches
2016-08-29  2:22             ` Levin, Alexander
2016-08-29  8:20               ` Christoph Hellwig
2016-08-29  7:15           ` [Ksummit-discuss] " Alexandre Belloni
2016-08-29  9:01             ` Arnd Bergmann
2016-08-29 12:47               ` Joe Perches
2016-08-29 17:16                 ` Josh Triplett
2016-08-29 17:41                   ` Joe Perches
2016-08-29 17:46         ` Luck, Tony
2016-08-29 18:01           ` Joe Perches
2016-08-29 18:47             ` Joe Perches
2016-08-29 19:08             ` Josh Triplett
2016-08-29 21:07             ` Arnd Bergmann
2016-08-29 11:15     ` Kalle Valo
2016-08-29 12:30       ` Joe Perches
2016-08-29 18:01         ` Kalle Valo
2016-08-29 19:00           ` Joe Perches
2016-08-29 21:00           ` Arnd Bergmann [this message]
2016-08-28  7:56   ` [Ksummit-discuss] " Alexey Dobriyan
2016-08-28  9:59     ` Julia Lawall
2016-08-28 19:52       ` Joe Perches
2016-08-28 20:35         ` Jiri Kosina
2016-08-28 21:24         ` Dennis Kaarsemaker
2016-08-28 21:57           ` Joe Perches
2016-08-29 19:06 ` Dan Carpenter
2016-08-29 19:10   ` Josh Triplett
2016-08-29 19:17     ` Dan Carpenter
2016-08-29 19:34       ` Joe Perches
2016-08-29 19:21     ` Joe Perches

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=201608292300.35292.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=kvalo@codeaurora.org \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).