Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755548AbbLAB0A (ORCPT ); Mon, 30 Nov 2015 20:26:00 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:38820 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbbLABZ6 (ORCPT ); Mon, 30 Nov 2015 20:25:58 -0500 Date: Tue, 1 Dec 2015 02:25:46 +0100 From: Ralf Baechle To: Rasmus Villemoes Cc: Arnd Bergmann , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Richard Henderson , Geert Uytterhoeven , "Rafael J. Wysocki" Subject: Re: no-op delay loops Message-ID: <20151201012546.GC23993@linux-mips.org> References: <87si3rbz6p.fsf@rasmusvillemoes.dk> <3228673.rOyW85ILiP@wuerfel> <874mg3b2h5.fsf@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874mg3b2h5.fsf@rasmusvillemoes.dk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 43 On Mon, Nov 30, 2015 at 10:29:26PM +0100, Rasmus Villemoes wrote: > OK, thanks. That's a very very long time ago. > > FWIW, the remaining instances that my trivial coccinelle script found > are After your initial report I also wrote a coccinelle which is looking also for delay loops implemented in while loops. It found the following two: diff -u -p ./drivers/video/uvesafb.c /tmp/nothing/drivers/video/uvesafb.c --- ./drivers/video/uvesafb.c +++ /tmp/nothing/drivers/video/uvesafb.c @@ -1142,7 +1142,6 @@ static int uvesafb_blank(int blank, stru vga_wseq(NULL, 0x00, seq); crtc17 |= vga_rcrt(NULL, 0x17) & ~0x80; - while (loop--); vga_wcrt(NULL, 0x17, crtc17); vga_wseq(NULL, 0x00, 0x03); } else diff -u -p ./arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c /tmp/nothing/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c --- ./arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c +++ /tmp/nothing/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c @@ -37,7 +37,6 @@ static void delay(int delay) { - while (delay--); } static void send_bit(unsigned char bit) The 2nd file falls into my domain so I'm going to fix it. Not sure how the uvesafb one should be treated. Ralf -- 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/