public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND^2] usb: gadget: udc: atmel: fix debug output
@ 2017-03-08  8:00 Arnd Bergmann
  2017-03-08 12:06 ` Felipe Balbi
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-03-08  8:00 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: Arnd Bergmann, Nicolas Ferre, Alexandre Belloni, Robert Jarzmik,
	Joe Perches, Cristian Birsan, linux-arm-kernel, linux-usb,
	linux-kernel

The debug output now contains the wrong variable, as seen from the compiler
warning:

drivers/usb/gadget/udc/atmel_usba_udc.c: In function 'usba_ep_enable':
drivers/usb/gadget/udc/atmel_usba_udc.c:632:550: error: 'ept_cfg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  DBG(DBG_ERR, "%s: EPT_CFG = 0x%lx (maxpacket = %lu)\n",

This changes the debug output the same way as the other code.

Fixes: 741d2558bf0a ("usb: gadget: udc: atmel: Update endpoint allocation scheme")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
Originally this broke on Feb 1 and I sent this fix,
I resent it after it wasn't applied by Feb 22.

This is now one of only two build regressions that made it into
4.11-rc1 that are still broken on linux-next. Please apply

 drivers/usb/gadget/udc/atmel_usba_udc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 11bbce28bc23..2035906b8ced 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -610,7 +610,7 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
 {
 	struct usba_ep *ep = to_usba_ep(_ep);
 	struct usba_udc *udc = ep->udc;
-	unsigned long flags, ept_cfg, maxpacket;
+	unsigned long flags, maxpacket;
 	unsigned int nr_trans;
 
 	DBG(DBG_GADGET, "%s: ep_enable: desc=%p\n", ep->ep.name, desc);
@@ -630,7 +630,7 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
 	ep->is_in = 0;
 
 	DBG(DBG_ERR, "%s: EPT_CFG = 0x%lx (maxpacket = %lu)\n",
-			ep->ep.name, ept_cfg, maxpacket);
+			ep->ep.name, ep->ept_cfg, maxpacket);
 
 	if (usb_endpoint_dir_in(desc)) {
 		ep->is_in = 1;
-- 
2.9.0

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

* Re: [PATCH RESEND^2] usb: gadget: udc: atmel: fix debug output
  2017-03-08  8:00 [PATCH RESEND^2] usb: gadget: udc: atmel: fix debug output Arnd Bergmann
@ 2017-03-08 12:06 ` Felipe Balbi
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2017-03-08 12:06 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Arnd Bergmann, Nicolas Ferre, Alexandre Belloni, Robert Jarzmik,
	Joe Perches, Cristian Birsan, linux-arm-kernel, linux-usb,
	linux-kernel

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


Hi,

Arnd Bergmann <arnd@arndb.de> writes:
> The debug output now contains the wrong variable, as seen from the compiler
> warning:
>
> drivers/usb/gadget/udc/atmel_usba_udc.c: In function 'usba_ep_enable':
> drivers/usb/gadget/udc/atmel_usba_udc.c:632:550: error: 'ept_cfg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   DBG(DBG_ERR, "%s: EPT_CFG = 0x%lx (maxpacket = %lu)\n",
>
> This changes the debug output the same way as the other code.
>
> Fixes: 741d2558bf0a ("usb: gadget: udc: atmel: Update endpoint allocation scheme")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
> Originally this broke on Feb 1 and I sent this fix,
> I resent it after it wasn't applied by Feb 22.
>
> This is now one of only two build regressions that made it into
> 4.11-rc1 that are still broken on linux-next. Please apply

heh, it's in my queue. Just gimme time, I have a day job that's 100%
dedicated to mainline ;-)

-- 
balbi

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

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

end of thread, other threads:[~2017-03-08 12:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-08  8:00 [PATCH RESEND^2] usb: gadget: udc: atmel: fix debug output Arnd Bergmann
2017-03-08 12:06 ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox