Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287915 > unrolled thread

[PATCH 9/9] usb: host: ehci.h: move constant to right

Started by"Geyslan G. Bem" <geyslan@gmail.com>
First post2015-12-09 23:20 +0100
Last post2015-12-10 11:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 9/9] usb: host: ehci.h: move constant to right "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 23:20 +0100
    Re: [PATCH 9/9] usb: host: ehci.h: move constant to right Peter Senna Tschudin <peter.senna@gmail.com> - 2015-12-10 11:30 +0100

#1287915 — [PATCH 9/9] usb: host: ehci.h: move constant to right

From"Geyslan G. Bem" <geyslan@gmail.com>
Date2015-12-09 23:20 +0100
Subject[PATCH 9/9] usb: host: ehci.h: move constant to right
Message-ID<qDVfA-5Q2-7@gated-at.bofh.it>
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 <geyslan@gmail.com>
---
 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/

[toc] | [next] | [standalone]


#1288438

FromPeter Senna Tschudin <peter.senna@gmail.com>
Date2015-12-10 11:30 +0100
Message-ID<qE6E3-4Tg-31@gated-at.bofh.it>
In reply to#1287915
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 <geyslan@gmail.com>
Acked-by: Peter Senna Tschudin <peter.senna@gmail.com>
> ---
>  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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web