diff mbox

[Resend,1/2] usb: gadget: s3c2410_udc: Fix build error

Message ID 1391416179-24728-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Commit d246c9d55a90722fac9e7284201088eb62adcfc3
Headers show

Commit Message

Sachin Kamat Feb. 3, 2014, 8:29 a.m. UTC
Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'.
Fixes the following compilation error introduced by commit e117e742d310
("usb: gadget: add "maxpacket_limit" field to struct usb_ep"):

drivers/usb/gadget/s3c2410_udc.c: In function ‘s3c2410_udc_reinit’:
drivers/usb/gadget/s3c2410_udc.c:1632:3: error:
cannot take address of bit-field ‘maxpacket’
   usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/gadget/s3c2410_udc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sachin Kamat Feb. 17, 2014, 9:19 a.m. UTC | #1
On 3 February 2014 13:59, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'.
> Fixes the following compilation error introduced by commit e117e742d310
> ("usb: gadget: add "maxpacket_limit" field to struct usb_ep"):
>
> drivers/usb/gadget/s3c2410_udc.c: In function 's3c2410_udc_reinit':
> drivers/usb/gadget/s3c2410_udc.c:1632:3: error:
> cannot take address of bit-field 'maxpacket'
>    usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
> ---
>  drivers/usb/gadget/s3c2410_udc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
> index f04b2c3154de..dd9678f85c58 100644
> --- a/drivers/usb/gadget/s3c2410_udc.c
> +++ b/drivers/usb/gadget/s3c2410_udc.c
> @@ -1629,7 +1629,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev)
>                 ep->ep.desc = NULL;
>                 ep->halted = 0;
>                 INIT_LIST_HEAD(&ep->queue);
> -               usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);
> +               usb_ep_set_maxpacket_limit(&ep->ep, ep->ep.maxpacket);
>         }
>  }
>
> --
> 1.7.9.5
>

Gentle Ping Felipe.
Felipe Balbi Feb. 18, 2014, 3:28 p.m. UTC | #2
On Mon, Feb 03, 2014 at 01:59:38PM +0530, Sachin Kamat wrote:
> Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'.
> Fixes the following compilation error introduced by commit e117e742d310
> ("usb: gadget: add "maxpacket_limit" field to struct usb_ep"):
> 
> drivers/usb/gadget/s3c2410_udc.c: In function ‘s3c2410_udc_reinit’:
> drivers/usb/gadget/s3c2410_udc.c:1632:3: error:
> cannot take address of bit-field ‘maxpacket’
>    usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>

is this still needed for -rc4 ?

> ---
>  drivers/usb/gadget/s3c2410_udc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
> index f04b2c3154de..dd9678f85c58 100644
> --- a/drivers/usb/gadget/s3c2410_udc.c
> +++ b/drivers/usb/gadget/s3c2410_udc.c
> @@ -1629,7 +1629,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev)
>  		ep->ep.desc = NULL;
>  		ep->halted = 0;
>  		INIT_LIST_HEAD(&ep->queue);
> -		usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);
> +		usb_ep_set_maxpacket_limit(&ep->ep, ep->ep.maxpacket);
>  	}
>  }
>  
> -- 
> 1.7.9.5
>
Sachin Kamat Feb. 19, 2014, 3:44 a.m. UTC | #3
On 18 February 2014 20:58, Felipe Balbi <balbi@ti.com> wrote:
> On Mon, Feb 03, 2014 at 01:59:38PM +0530, Sachin Kamat wrote:
>> Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'.
>> Fixes the following compilation error introduced by commit e117e742d310
>> ("usb: gadget: add "maxpacket_limit" field to struct usb_ep"):
>>
>> drivers/usb/gadget/s3c2410_udc.c: In function 's3c2410_udc_reinit':
>> drivers/usb/gadget/s3c2410_udc.c:1632:3: error:
>> cannot take address of bit-field 'maxpacket'
>>    usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
>
> is this still needed for -rc4 ?

I just verified on latest linux-next and we still get build errors
without this patch.
Hence, yes this patch is required for the current rc.
diff mbox

Patch

diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index f04b2c3154de..dd9678f85c58 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -1629,7 +1629,7 @@  static void s3c2410_udc_reinit(struct s3c2410_udc *dev)
 		ep->ep.desc = NULL;
 		ep->halted = 0;
 		INIT_LIST_HEAD(&ep->queue);
-		usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);
+		usb_ep_set_maxpacket_limit(&ep->ep, ep->ep.maxpacket);
 	}
 }