All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: udc: change comparison to bitshift when dealing with a mask
@ 2018-02-06  8:50 ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-02-06  8:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Felipe Balbi, Greg Kroah-Hartman, linux-usb

Due to a typo, the mask was destroyed by a comparison instead of a bit
shift.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Only build tested.

 drivers/usb/gadget/udc/goku_udc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/goku_udc.h b/drivers/usb/gadget/udc/goku_udc.h
index 26601bf4e7a935..70023d40107997 100644
--- a/drivers/usb/gadget/udc/goku_udc.h
+++ b/drivers/usb/gadget/udc/goku_udc.h
@@ -25,7 +25,7 @@ struct goku_udc_regs {
 #	define INT_EP1DATASET		0x00040
 #	define INT_EP2DATASET		0x00080
 #	define INT_EP3DATASET		0x00100
-#define INT_EPnNAK(n)		(0x00100 < (n))		/* 0 < n < 4 */
+#define INT_EPnNAK(n)		(0x00100 << (n))	/* 0 < n < 4 */
 #	define INT_EP1NAK		0x00200
 #	define INT_EP2NAK		0x00400
 #	define INT_EP3NAK		0x00800
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* usb: gadget: udc: change comparison to bitshift when dealing with a mask
@ 2018-02-06  8:50 ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-02-06  8:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Felipe Balbi, Greg Kroah-Hartman, linux-usb

Due to a typo, the mask was destroyed by a comparison instead of a bit
shift.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Only build tested.

 drivers/usb/gadget/udc/goku_udc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/goku_udc.h b/drivers/usb/gadget/udc/goku_udc.h
index 26601bf4e7a935..70023d40107997 100644
--- a/drivers/usb/gadget/udc/goku_udc.h
+++ b/drivers/usb/gadget/udc/goku_udc.h
@@ -25,7 +25,7 @@ struct goku_udc_regs {
 #	define INT_EP1DATASET		0x00040
 #	define INT_EP2DATASET		0x00080
 #	define INT_EP3DATASET		0x00100
-#define INT_EPnNAK(n)		(0x00100 < (n))		/* 0 < n < 4 */
+#define INT_EPnNAK(n)		(0x00100 << (n))	/* 0 < n < 4 */
 #	define INT_EP1NAK		0x00200
 #	define INT_EP2NAK		0x00400
 #	define INT_EP3NAK		0x00800

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: gadget: udc: change comparison to bitshift when dealing with a mask
@ 2018-02-06  8:54   ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-02-06  8:54 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Felipe Balbi, Greg Kroah-Hartman, linux-usb,
	linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

On Tue, Feb 06, 2018 at 09:50:40AM +0100, Wolfram Sang wrote:
> Due to a typo, the mask was destroyed by a comparison instead of a bit
> shift.
> 
> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> Only build tested.

Add. note: according to 'git grep', this macro is unused currently, so
no regression.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* usb: gadget: udc: change comparison to bitshift when dealing with a mask
@ 2018-02-06  8:54   ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-02-06  8:54 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Felipe Balbi, Greg Kroah-Hartman, linux-usb,
	linux-renesas-soc

On Tue, Feb 06, 2018 at 09:50:40AM +0100, Wolfram Sang wrote:
> Due to a typo, the mask was destroyed by a comparison instead of a bit
> shift.
> 
> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> Only build tested.

Add. note: according to 'git grep', this macro is unused currently, so
no regression.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-06  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06  8:50 [PATCH] usb: gadget: udc: change comparison to bitshift when dealing with a mask Wolfram Sang
2018-02-06  8:50 ` Wolfram Sang
2018-02-06  8:54 ` [PATCH] " Wolfram Sang
2018-02-06  8:54   ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.