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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2170C77B73 for ; Thu, 27 Apr 2023 12:26:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243678AbjD0M0F (ORCPT ); Thu, 27 Apr 2023 08:26:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243155AbjD0M0E (ORCPT ); Thu, 27 Apr 2023 08:26:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E48230E8; Thu, 27 Apr 2023 05:26:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AD46560A5A; Thu, 27 Apr 2023 12:26:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94798C433EF; Thu, 27 Apr 2023 12:26:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1682598363; bh=NDjcnjrD5MYzmw1SLBy1J2PWWpUOnpu9UddoVoHMpQM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=beqeBPWHIW7HJkLMlmT08248JmMIqiHrt43q8BBhTk2Jz2E1JuyvfNko+56z98ClJ Ucfv9H4KCA5Q0x4BApVC2BSCuK9Ylp1552sqTMOhP8hCpXBlymrojPyGFtkGKhvPT2 goib2pFmGq0bWc8Ev7UBeymkGQeku2LaPy1xqltk= Date: Thu, 27 Apr 2023 14:26:00 +0200 From: Greg Kroah-Hartman To: Konrad =?iso-8859-1?Q?Gr=E4fe?= Cc: Quentin Schulz , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kyungmin Park , Andrzej Pietrasiewicz , Felipe Balbi , stable@vger.kernel.org Subject: Re: [PATCH v3 1/2] vsprintf: Add %p[mM]U for uppercase MAC address Message-ID: <2023042731-pedigree-bash-809b@gregkh> References: <2023042625-rendition-distort-fe06@gregkh> <20230427115120.241954-1-k.graefe@gateware.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230427115120.241954-1-k.graefe@gateware.de> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Thu, Apr 27, 2023 at 01:51:19PM +0200, Konrad Gräfe wrote: > The CDC-ECM specification requires an USB gadget to send the host MAC > address as uppercase hex string. This change adds the appropriate > modifier. > > Cc: stable@vger.kernel.org > Signed-off-by: Konrad Gräfe > --- > Added in v3 > > lib/vsprintf.c | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c > index be71a03c936a..8aee1caabd9e 100644 > --- a/lib/vsprintf.c > +++ b/lib/vsprintf.c > @@ -1269,9 +1269,10 @@ char *mac_address_string(char *buf, char *end, u8 *addr, > { > char mac_addr[sizeof("xx:xx:xx:xx:xx:xx")]; > char *p = mac_addr; > - int i; > + int i, pos; > char separator; > bool reversed = false; > + bool uppercase = false; > > if (check_pointer(&buf, end, addr, spec)) > return buf; > @@ -1281,6 +1282,10 @@ char *mac_address_string(char *buf, char *end, u8 *addr, > separator = '-'; > break; > > + case 'U': > + uppercase = true; > + break; No documentation update as well? thanks, greg k-h