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

2015-12-10 Thread Peter Senna Tschudin
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-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-12-09 Thread Geyslan G. Bem
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 
---
 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 */
 #defineSITD_IOC(1 << 31)   /* interrupt on completion */
 #defineSITD_PAGE   (1 << 30)   /* buffer 0/1 */
-#defineSITD_LENGTH(x)  (0x3ff & ((x)>>16))
+#defineSITD_LENGTH(x)  (((x) >> 16) & 0x3ff)
 #defineSITD_STS_ACTIVE (1 << 7)/* HC may execute this */
 #defineSITD_STS_ERR(1 << 6)/* error from TT */
 #defineSITD_STS_DBE(1 << 5)/* data buffer error (in HC) */
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html