From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01DECC4320A for ; Sun, 22 Aug 2021 08:57:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD5A56120A for ; Sun, 22 Aug 2021 08:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232917AbhHVI5t (ORCPT ); Sun, 22 Aug 2021 04:57:49 -0400 Received: from smtprelay0195.hostedemail.com ([216.40.44.195]:52918 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231147AbhHVI5s (ORCPT ); Sun, 22 Aug 2021 04:57:48 -0400 Received: from omf20.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 179F0837F24A; Sun, 22 Aug 2021 08:57:07 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA id B9EDD18A600; Sun, 22 Aug 2021 08:57:05 +0000 (UTC) Message-ID: <8afa5f3847a18ab15005614903646da822c1267a.camel@perches.com> Subject: Re: [PATCH] vsprintf and docs: Add X to %ph for upper case output From: Joe Perches To: Andy Shevchenko Cc: Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Linux Documentation List , Linux Kernel Mailing List Date: Sun, 22 Aug 2021 01:57:04 -0700 In-Reply-To: References: <6abd83d11f1daa3094f82e92843e8279f302e349.camel@perches.com> <12a41a13f8d03a16c3d5c20710a901c090b7d244.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: B9EDD18A600 X-Stat-Signature: wgy1553wk4biasi49qfz8yjj6b44wkmz X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18rAtfRSpKbw6o4poblu2d7KN68o7P98rA= X-HE-Tag: 1629622625-21147 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2021-08-22 at 11:53 +0300, Andy Shevchenko wrote: > On Sun, Aug 22, 2021 at 11:45 AM Joe Perches wrote: > > On Sun, 2021-08-22 at 11:31 +0300, Andy Shevchenko wrote: > > > On Sun, Aug 22, 2021 at 6:00 AM Joe Perches wrote: > > > > > > > > Uppercase hex output of small char arrays is moderately frequently used. > > > > Add a mechanism to support the %*ph output as uppercase using 'X'. > > > > > > Besides the fact of existing hex_asc_upper_*(), what ABI (!) uses > > > this? If none, I dunno we need this. > > > And show at least a few users where we gain something after conversion. > > > > > > > There are at least a few uses that could be converted. > > Provide a series then! > > ... > > > + return snprintf(buf, 16 * 2 + 2, "%16phNX\n", sn); > > > + return scnprintf(buffer, PAGE_SIZE, "%16phNX\n", unique_id); > > I think you need to convert to sysfs_emit() in both cases. First things first...