Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571724 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-02-01 17:50 +0100 |
| Last post | 2017-02-01 18:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] usb: gadget: udc: atmel: fix debug output Arnd Bergmann <arnd@arndb.de> - 2017-02-01 17:50 +0100
Re: [PATCH] usb: gadget: udc: atmel: fix debug output Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-02-01 18:10 +0100
Re: [PATCH] usb: gadget: udc: atmel: fix debug output Nicolas Ferre <nicolas.ferre@microchip.com> - 2017-02-01 18:10 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-02-01 17:50 +0100 |
| Subject | [PATCH] usb: gadget: udc: atmel: fix debug output |
| Message-ID | <t66gx-8kU-5@gated-at.bofh.it> |
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>
---
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
[toc] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-02-01 18:10 +0100 |
| Message-ID | <t66zU-fo-11@gated-at.bofh.it> |
| In reply to | #1571724 |
On 01/02/2017 at 17:41:55 +0100, Arnd Bergmann wrote:
> 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>
> ---
> 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
>
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Ferre <nicolas.ferre@microchip.com> |
|---|---|
| Date | 2017-02-01 18:10 +0100 |
| Message-ID | <t66zU-fo-23@gated-at.bofh.it> |
| In reply to | #1571766 |
Le 01/02/2017 à 18:00, Alexandre Belloni a écrit :
> On 01/02/2017 at 17:41:55 +0100, Arnd Bergmann wrote:
>> 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>
>
>> ---
>> 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
>>
>
--
Nicolas Ferre
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web