* [PATCH linux-next] staging: emxx_udc: replace strict_strtol call
@ 2014-06-28 17:00 Vincent Stehlé
2014-06-28 17:09 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Stehlé @ 2014-06-28 17:00 UTC (permalink / raw)
To: linux-next, devel, linux-kernel
Cc: Greg Kroah-Hartman, Magnus Damm, Vincent Stehlé
Commit 582e9d37a9a3 'include/linux: remove strict_strto* definitions' has
obsoleted the strict_strtol function. Use kstrtol instead.
This fixes the following compilation error:
drivers/staging/emxx_udc/emxx_udc.c: In function ‘nbu2ss_drv_set_ep_info’:
drivers/staging/emxx_udc/emxx_udc.c:3287:3: error: implicit declaration of function ‘strict_strtol’ [-Werror=implicit-function-declaration]
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Magnus Damm <damm+renesas@opensource.se>
---
Hi,
This compilation error can be seen with e.g. linux next-20140627 and arm
allmodconfig.
Best regards,
V.
drivers/staging/emxx_udc/emxx_udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index ee0094d..b5c1511 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -3285,7 +3285,7 @@ static void __init nbu2ss_drv_set_ep_info(
tempbuf[0] = name[2];
tempbuf[1] = '\0';
- res = strict_strtol(tempbuf, 16, &num);
+ res = kstrtol(tempbuf, 16, &num);
if (num == 0)
ep->ep.maxpacket = EP0_PACKETSIZE;
--
2.0.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] staging: emxx_udc: replace strict_strtol call
2014-06-28 17:00 [PATCH linux-next] staging: emxx_udc: replace strict_strtol call Vincent Stehlé
@ 2014-06-28 17:09 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2014-06-28 17:09 UTC (permalink / raw)
To: Vincent Stehlé
Cc: devel, Greg Kroah-Hartman, linux-next, Magnus Damm, linux-kernel
On Sat, 2014-06-28 at 19:00 +0200, Vincent Stehlé wrote:
> Commit 582e9d37a9a3 'include/linux: remove strict_strto* definitions' has
> obsoleted the strict_strtol function. Use kstrtol instead.
[]
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
[]
> @@ -3285,7 +3285,7 @@ static void __init nbu2ss_drv_set_ep_info(
>
> tempbuf[0] = name[2];
> tempbuf[1] = '\0';
> - res = strict_strtol(tempbuf, 16, &num);
> + res = kstrtol(tempbuf, 16, &num);
The whole block if code is obtuse and should be simplified to:
---
drivers/staging/emxx_udc/emxx_udc.c | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index c92ded8..f41831e 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -3276,24 +3276,10 @@ static void __init nbu2ss_drv_set_ep_info(
ep->ep.name = name;
ep->ep.ops = &nbu2ss_ep_ops;
- if (isdigit(name[2])) {
-
- long num;
- int res;
- char tempbuf[2];
-
- tempbuf[0] = name[2];
- tempbuf[1] = '\0';
- res = strict_strtol(tempbuf, 16, &num);
-
- if (num == 0)
- ep->ep.maxpacket = EP0_PACKETSIZE;
- else
- ep->ep.maxpacket = EP_PACKETSIZE;
-
- } else {
+ if (name[2] == '0')
+ ep->ep.maxpacket = EP0_PACKETSIZE;
+ else
ep->ep.maxpacket = EP_PACKETSIZE;
- }
list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
INIT_LIST_HEAD(&ep->queue);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-28 17:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-28 17:00 [PATCH linux-next] staging: emxx_udc: replace strict_strtol call Vincent Stehlé
2014-06-28 17:09 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox