Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755725AbbLLBXc (ORCPT ); Fri, 11 Dec 2015 20:23:32 -0500 Received: from mail-qk0-f176.google.com ([209.85.220.176]:36059 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755269AbbLLBUG (ORCPT ); Fri, 11 Dec 2015 20:20:06 -0500 From: "Geyslan G. Bem" To: peter.senna@gmail.com Cc: "Geyslan G. Bem" , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Stern , Greg Kroah-Hartman Subject: [PATCH 02/10] usb: host: ehci-sched: move constants to right Date: Fri, 11 Dec 2015 22:19:19 -0300 Message-Id: <1449883170-21225-3-git-send-email-geyslan@gmail.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1449883170-21225-1-git-send-email-geyslan@gmail.com> References: <1449883170-21225-1-git-send-email-geyslan@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1477 Lines: 46 This patch moves the constants to right. Tested by compilation only. Caught by coccinelle: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 86b2484..89bc9e4 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -330,7 +330,7 @@ static int __maybe_unused same_tt(struct usb_device *dev1, */ static inline unsigned char tt_start_uframe(struct ehci_hcd *ehci, __hc32 mask) { - unsigned char smask = QH_SMASK & hc32_to_cpu(ehci, mask); + unsigned char smask = hc32_to_cpu(ehci, mask) & QH_SMASK; if (!smask) { ehci_err(ehci, "invalid empty smask!\n"); /* uframe 7 can't have bw so this will indicate failure */ @@ -409,11 +409,11 @@ static int tt_available ( * must be empty, so as to not illegally delay * already scheduled transactions */ - if (125 < usecs) { + if (usecs > 125) { int ufs = (usecs / 125); for (i = uframe; i < (uframe + ufs) && i < 8; i++) - if (0 < tt_usecs[i]) + if (tt_usecs[i] > 0) return 0; } -- 2.6.3 -- 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/