From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756443AbcH2VAy (ORCPT ); Mon, 29 Aug 2016 17:00:54 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:55888 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754981AbcH2VAx (ORCPT ); Mon, 29 Aug 2016 17:00:53 -0400 From: Arnd Bergmann To: ksummit-discuss@lists.linuxfoundation.org Subject: Re: [Ksummit-discuss] checkkpatch (in)sanity ? Date: Mon, 29 Aug 2016 23:00:35 +0200 User-Agent: KMail/1.12.2 (Linux/4.7.0-rc7+; KDE/4.3.2; x86_64; ; ) Cc: Kalle Valo , Joe Perches , Greg KH , Sasha Levin , LKML References: <1472330452.26978.23.camel@perches.com> <1472473855.3425.18.camel@perches.com> <87lgzfihel.fsf@kamboji.qca.qualcomm.com> In-Reply-To: <87lgzfihel.fsf@kamboji.qca.qualcomm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201608292300.35292.arnd@arndb.de> X-Provags-ID: V03:K0:WxpHoJWG/i35T/uPsibwYoYRlYEuuL5GGzVLX+4+PyZ14k7uePC cZpbausvdxUzMAv5rxziDHRnZOmIoirNKMjkC3AVgzLjtGq8I0NyI+qwuu0BfXgRYh01dyU Owxik8mZuLVxI/YWrq8FOSEIYtkkY68sMLJgLz6o8uMMjYd7EhUJ/78imTgZ+Ii9bfqQA+9 jUCx/Lr/kPwJqf9G0DNcg== X-UI-Out-Filterresults: notjunk:1;V01:K0:JYeTdqWbUr8=:so4SN9RihnL66nH2jNqTMG t2aPbljMhkvAMB69bNBC3JTVep9jCl8EcjBDlSTwL1EHrT1UDWfSKBQw+cghncioMqHqDI1CC hO/Rit+mcSfubA+G/lFAUbG/OU6ggL+pHyjOpij5lUewhA54yV035kS+tk5QV2oaRWbrJa+6i PTwdiAnpVJWM7de0EQwGjgxj6LS7hx609eijvOJuck83L7RkB86bhxSUvBRMEjRrzUy+wCXTF vfAS8NU/pifLKs0+onnn23QraJeB48BmG7xeX5wwtCxqwNRsZVVri3U/5Sf/TEXn15d2DFt9A TyaDle9yvjbt8ugR+Qn5FFMribnDZl7fEwRXfMG1dw7GOmoQouInGFqTP1k06E8NkGETKyhfb pFalNwORcdcyGZNjyzM0Dx4//wy/dcEdBgAZlEzzBGVBkxPLr0uaPepgDVXtMhnASRKOArVd4 6bGOXa+p5/YvZsF2vEAKdDH4RVEGZkxI9RKM5V06V6k3Ut8zAnBRUYhUTHeaQrHG15i3r2FSW E+eMZvYG04RpgWcamfYoHgfoaM/8L7vipJwVjSgvcD5meNJI3QT73iDIm2v5gEpLQt77XgE6v RdIGExeVnwwnA/MrCqpi34cU6UFBNCdqHtZbUOaZebzKXD5BgVQQnRMOs63nUKNu7ZjC3dyJT 9qFa+ULzFaq79ODDll+GTiZWn04KfEtl3Ym312q2QPhkEUh6dhipRpwQw1q8QSz0Oa2Ui2PNn q1qOtkPLXb8iwCKi Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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