Thread (10 messages) 10 messages, 3 authors, 2017-02-08

Re: [PATCH v3 1/3] lib/string: introduce ascii2utf16le() helper

From: Alan Stern <hidden>
Date: 2017-02-06 15:40:49
Also in: lkml

On Mon, 6 Feb 2017, Richard Leitner wrote:
On 02/06/2017 04:12 PM, Alan Stern wrote:
quoted
On Mon, 6 Feb 2017, Richard Leitner wrote:
quoted
For USB string descriptors we need to convert ASCII strings to UTF16-LE.
Therefore make a simple helper function (based on ascii2desc from
drivers/usb/core/hcd.c) for that purpose.
You know, we already have utf8s_to_utf16s() in fs/nls/nls_base.c.  
Maybe it doesn't do exactly what you want, but it should be pretty 
close.  Adding another helper function to do essentially the same thing 
seems unnecessary.
Thanks for that pointer. I totally agree with you.

So it would be OK to include linux/nls.h and use utf8s_to_utf16s() in
drivers/usb/{core/hcd.c,misc/usb251xb.c}?
Well, we already include linux/nls.h in drivers/usb/core/message.c and
a few files under drivers/usb/gadget.  Putting it in a few more places
shouldn't hurt.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help