mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Leitner <richard.leitner@skidata.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <gregkh@linuxfoundation.org>,
	<robh+dt@kernel.org>, <mark.rutland@arm.com>,
	<akpm@linux-foundation.org>, <andriy.shevchenko@linux.intel.com>,
	<keescook@chromium.org>, <dev@g0hl1n.net>
Subject: Re: [PATCH v3 1/3] lib/string: introduce ascii2utf16le() helper
Date: Mon, 6 Feb 2017 16:31:01 +0100	[thread overview]
Message-ID: <4730c4f2-6012-5267-90d3-bc447ec7963d@skidata.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1702061009590.2010-100000@iolanthe.rowland.org>

On 02/06/2017 04:12 PM, Alan Stern wrote:
> On Mon, 6 Feb 2017, Richard Leitner wrote:
> 
>> 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}?

Thanks & regards,
Richard L

  reply	other threads:[~2017-02-06 15:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 14:03 [PATCH v3 0/3] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver Richard Leitner
2017-02-06 14:03 ` [PATCH v3 1/3] lib/string: introduce ascii2utf16le() helper Richard Leitner
2017-02-06 15:12   ` Alan Stern
2017-02-06 15:31     ` Richard Leitner [this message]
2017-02-06 15:40       ` Alan Stern
2017-02-06 15:43         ` Richard Leitner
2017-02-06 16:48   ` Sergei Shtylyov
2017-02-08  8:33     ` Richard Leitner
2017-02-06 14:03 ` [PATCH v3 2/3] usb: core: hcd: use ascii2utf16le() in ascii2desc() Richard Leitner
2017-02-06 14:03 ` [PATCH v3 3/3] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver Richard Leitner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4730c4f2-6012-5267-90d3-bc447ec7963d@skidata.com \
    --to=richard.leitner@skidata.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dev@g0hl1n.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®