linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/usb/gadget/udc/r8a66597-udc.c: Deinline pipe_change, save 2176 bytes
@ 2016-04-08 19:55 Denys Vlasenko
  2016-04-11  5:21 ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Denys Vlasenko @ 2016-04-08 19:55 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Denys Vlasenko, linux-usb, linux-kernel

This function compiles to 298 bytes of machine code, has ~10 callsites.

This is a USB 2.0 device, USB 2.0 is limited to 35 MB/s, so should be almost never CPU bound.
No need to optimize for speed this agressively.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Felipe Balbi <balbi@ti.com>
CC: linux-usb@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 drivers/usb/gadget/udc/r8a66597-udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c
index baa0609..1d79a47 100644
--- a/drivers/usb/gadget/udc/r8a66597-udc.c
+++ b/drivers/usb/gadget/udc/r8a66597-udc.c
@@ -296,7 +296,7 @@ static void r8a66597_change_curpipe(struct r8a66597 *r8a66597, u16 pipenum,
 	} while ((tmp & mask) != loop);
 }
 
-static inline void pipe_change(struct r8a66597 *r8a66597, u16 pipenum)
+static void pipe_change(struct r8a66597 *r8a66597, u16 pipenum)
 {
 	struct r8a66597_ep *ep = r8a66597->pipenum2ep[pipenum];
 
-- 
2.1.0

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

* Re: [PATCH] drivers/usb/gadget/udc/r8a66597-udc.c: Deinline pipe_change, save 2176 bytes
  2016-04-08 19:55 [PATCH] drivers/usb/gadget/udc/r8a66597-udc.c: Deinline pipe_change, save 2176 bytes Denys Vlasenko
@ 2016-04-11  5:21 ` Felipe Balbi
  2016-04-11  8:26   ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2016-04-11  5:21 UTC (permalink / raw)
  To: Denys Vlasenko, Felipe Balbi; +Cc: Denys Vlasenko, linux-usb, linux-kernel

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


Hi,

Denys Vlasenko <dvlasenk@redhat.com> writes:
> This function compiles to 298 bytes of machine code, has ~10 callsites.

fair enough

> This is a USB 2.0 device, USB 2.0 is limited to 35 MB/s, so should be

it's not limited to 35MB/sec, sorry. USB 2.0 has a theoretical maximum
of 60MB/sec. But 44MB/sec is what people consider 'possible'. I've
gotten to 41MB/sec with g_mas_storage gadget.

> almost never CPU bound.
>
> No need to optimize for speed this agressively.
>
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Felipe Balbi <balbi@ti.com>
> CC: linux-usb@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
> ---
>  drivers/usb/gadget/udc/r8a66597-udc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c
> index baa0609..1d79a47 100644
> --- a/drivers/usb/gadget/udc/r8a66597-udc.c
> +++ b/drivers/usb/gadget/udc/r8a66597-udc.c
> @@ -296,7 +296,7 @@ static void r8a66597_change_curpipe(struct r8a66597 *r8a66597, u16 pipenum,
>  	} while ((tmp & mask) != loop);
>  }
>  
> -static inline void pipe_change(struct r8a66597 *r8a66597, u16 pipenum)
> +static void pipe_change(struct r8a66597 *r8a66597, u16 pipenum)
>  {
>  	struct r8a66597_ep *ep = r8a66597->pipenum2ep[pipenum];
>  
> -- 
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
balbi

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

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

* Re: [PATCH] drivers/usb/gadget/udc/r8a66597-udc.c: Deinline pipe_change, save 2176 bytes
  2016-04-11  5:21 ` Felipe Balbi
@ 2016-04-11  8:26   ` Felipe Balbi
  0 siblings, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2016-04-11  8:26 UTC (permalink / raw)
  To: Denys Vlasenko, Felipe Balbi; +Cc: Denys Vlasenko, linux-usb, linux-kernel

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


Hi again,

Felipe Balbi <felipe.balbi@linux.intel.com> writes:
> Denys Vlasenko <dvlasenk@redhat.com> writes:
>> This function compiles to 298 bytes of machine code, has ~10 callsites.
>
> fair enough
>
>> This is a USB 2.0 device, USB 2.0 is limited to 35 MB/s, so should be
>
> it's not limited to 35MB/sec, sorry. USB 2.0 has a theoretical maximum
> of 60MB/sec. But 44MB/sec is what people consider 'possible'. I've
> gotten to 41MB/sec with g_mas_storage gadget.

also, you need to break you commit log lines at 72 characters. Please,
fix and resend

-- 
balbi

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

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

end of thread, other threads:[~2016-04-11  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-08 19:55 [PATCH] drivers/usb/gadget/udc/r8a66597-udc.c: Deinline pipe_change, save 2176 bytes Denys Vlasenko
2016-04-11  5:21 ` Felipe Balbi
2016-04-11  8:26   ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).