From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754186AbdBFPbY (ORCPT ); Mon, 6 Feb 2017 10:31:24 -0500 Received: from mail1.skidata.com ([91.230.2.99]:36888 "EHLO mail1.skidata.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754157AbdBFPbW (ORCPT ); Mon, 6 Feb 2017 10:31:22 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HZBAChlphY/0oKEKxdDg0BAQEDAQEBC?= =?us-ascii?q?QEBAYReZp9GHxCTGIQbhiICgw4VAQIBAQEBAQEBA4EHhGoBBTIBRhALDQsuVwY?= =?us-ascii?q?NAQcCuysmAosTAQEBAQEBBAEBAQEBIwkBhkKCBQiCYoo5BZtmgX2aSBeGL5MMN?= =?us-ascii?q?YEhDxAPBB2GWDyIfYEMAQEB?= X-IPAS-Result: =?us-ascii?q?A2HZBAChlphY/0oKEKxdDg0BAQEDAQEBCQEBAYReZp9GHxC?= =?us-ascii?q?TGIQbhiICgw4VAQIBAQEBAQEBA4EHhGoBBTIBRhALDQsuVwYNAQcCuysmAosTA?= =?us-ascii?q?QEBAQEBBAEBAQEBIwkBhkKCBQiCYoo5BZtmgX2aSBeGL5MMNYEhDxAPBB2GWDy?= =?us-ascii?q?IfYEMAQEB?= X-IronPort-AV: E=Sophos;i="5.33,342,1477954800"; d="scan'208";a="2325423" Subject: Re: [PATCH v3 1/3] lib/string: introduce ascii2utf16le() helper To: Alan Stern References: CC: , , , , , , , , , From: Richard Leitner Message-ID: <4730c4f2-6012-5267-90d3-bc447ec7963d@skidata.com> Date: Mon, 6 Feb 2017 16:31:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [172.16.60.30] X-ClientProxiedBy: sdex1srv.skidata.net (172.16.10.92) To sdex1srv.skidata.net (172.16.10.92) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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