Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752072AbbLMQfM (ORCPT ); Sun, 13 Dec 2015 11:35:12 -0500 Received: from mail-vk0-f50.google.com ([209.85.213.50]:32912 "EHLO mail-vk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973AbbLMQfL (ORCPT ); Sun, 13 Dec 2015 11:35:11 -0500 MIME-Version: 1.0 In-Reply-To: References: <1449979438-12038-2-git-send-email-geyslan@gmail.com> Date: Sun, 13 Dec 2015 13:35:09 -0300 Message-ID: Subject: Re: [PATCH v2 01/10] usb: host: ehci-sched: refactor scan_isoc function From: "Geyslan G. Bem" To: Alan Stern Cc: Peter Senna Tschudin , linux-usb@vger.kernel.org, LKML , Greg Kroah-Hartman Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1107 Lines: 37 2015-12-13 12:29 GMT-03:00 Alan Stern : > On Sun, 13 Dec 2015, Geyslan G. Bem wrote: > >> This patch removes an infinite 'for' loop and makes use of the already >> existing 'restart' tag instead, reducing one leading tab. >> >> It also puts the easier evaluation (live variable) to be the first in >> two conditionals. >> >> if (live && frame == now_frame) { ... >> >> if (live && ((frame == now_frame) || ... > > You should never do this. The first test in a conditional should be > the one that is most likely to cause the expression to fail. In this > case, live is almost always true whereas frame == now_frame is true > only some percentage of the time. Therefore the frame == now_frame > test should come first. I see. Doing v3 and undoing the reordering. > > Alan Stern > -- Regards, Geyslan G. Bem hackingbits.com -- 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/