Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753647AbbLJKXj (ORCPT ); Thu, 10 Dec 2015 05:23:39 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:34287 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbbLJKXh (ORCPT ); Thu, 10 Dec 2015 05:23:37 -0500 Date: Thu, 10 Dec 2015 11:23:32 +0100 From: Peter Senna Tschudin To: "Geyslan G. Bem" Cc: Alan Stern , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 9/9] usb: host: ehci.h: move constant to right Message-ID: <20151210102332.GI4013@toshiba-peter.rsr.lip6.fr> References: <1449699341-12969-1-git-send-email-geyslan@gmail.com> <1449699341-12969-9-git-send-email-geyslan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449699341-12969-9-git-send-email-geyslan@gmail.com> 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: 1320 Lines: 34 On Wed, Dec 09, 2015 at 07:15:37PM -0300, Geyslan G. Bem wrote: > This patch moves the constant 0x3ff to right and put spaces > in the right shift. > > Caught by coccinelle: > scripts/coccinelle/misc/compare_const_fl.cocci > > Signed-off-by: Geyslan G. Bem Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > index 81e609a..de94555 100644 > --- a/drivers/usb/host/ehci.h > +++ b/drivers/usb/host/ehci.h > @@ -555,7 +555,7 @@ struct ehci_sitd { > __hc32 hw_results; /* EHCI table 3-11 */ > #define SITD_IOC (1 << 31) /* interrupt on completion */ > #define SITD_PAGE (1 << 30) /* buffer 0/1 */ > -#define SITD_LENGTH(x) (0x3ff & ((x)>>16)) > +#define SITD_LENGTH(x) (((x) >> 16) & 0x3ff) > #define SITD_STS_ACTIVE (1 << 7) /* HC may execute this */ > #define SITD_STS_ERR (1 << 6) /* error from TT */ > #define SITD_STS_DBE (1 << 5) /* data buffer error (in HC) */ > -- > 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/