Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6768965rwr; Tue, 2 May 2023 05:28:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72Mc1ifrLPBLIzsTNBXAnJfsoegtiM/+R97nXJkUkhu8GUgSWXgxsa2YlS3CvudmgVOutJ X-Received: by 2002:a05:6a20:7350:b0:f5:4edd:d82f with SMTP id v16-20020a056a20735000b000f54eddd82fmr25398646pzc.29.1683030487583; Tue, 02 May 2023 05:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683030487; cv=none; d=google.com; s=arc-20160816; b=JpKIrF2grKbEZcWeYsmljb1h5fppwlgF4xNYMFZNLEkyfd5ZLlc6Be+gPaXWpkhmx+ +XqEAyNO+qO88bkUfQPvQz5n+ceCacVDVudpIp5X5iZOvxH5PHmfErZnXaoagNRkhBuk Lo0m0KZd21VyM8tr3zItdehRF9jrWDkpfZQygIDWZBA09sjWbagfXmmdxtiSBRFyEiFL 7LmMovbAJldQP2LDqKRryfEqrH3cChMPGkUg19wTr2gq02GXyzT2bYNFwH1kW3wzrGKw 94PX38oNBfYatc9948fuSmoA2jek9ngQy9G7Pd/V/hu9t3BFB5ZOzz+rxWGZWg+XIN/W 26WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rpq/YOA2Q6NcOyBEqPAtPKwqdnVr3RL2S8jyTOYKx38=; b=GRu4wtCNfvyTG7Bl4dRYemdz3iRL9hsknXEIiicu3tMMCyMZ2Uuyx2ogfnNW9o0mSd JG6MzpHkmg4WjFQQ0szax0OkDkkLShkiKhd+sbPnwBjn4D2pARxEhZNd8G5tNQsmdlVp 94PZwcAodEoABGN1+OJx99D2tpEzDRosV+6FjQBoaSzs1dPcEK/3IsasshUCw43qDb30 auzxW/rTGYqum7s63Ku/dWwW0SsDNEcyW7oIQdhGQZKPT95ZIOFV/YAhOcC8PD613Nep CSkqznsgoNYowV539wpMo5XSXy9rrxzOlwqpjMrUaafreYvtxx4wUKb0HXPzNrulZfsW C7Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=E5aokJVm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a656904000000b0050f7c95bafesi29560383pgq.73.2023.05.02.05.27.51; Tue, 02 May 2023 05:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=E5aokJVm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233947AbjEBMXN (ORCPT + 99 others); Tue, 2 May 2023 08:23:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjEBMXM (ORCPT ); Tue, 2 May 2023 08:23:12 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 608F7F5; Tue, 2 May 2023 05:23:10 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 1CF3B1F8BE; Tue, 2 May 2023 12:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1683030189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rpq/YOA2Q6NcOyBEqPAtPKwqdnVr3RL2S8jyTOYKx38=; b=E5aokJVmN+jHpsNd8DP9p105k0emCQTSinruXmu1ftje8AFOFPqifHIr20RRU45v5R0EkX 3+6Ybnq8FpRRlcJ1+403QG6JiojNfSG/tigO1MGc3nD2+PDhHJvBGzWMuSG//jEr46Xoap qvMgIEcWCV64sDbPjzXHNLVvQHEWqnU= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 231412C141; Tue, 2 May 2023 12:23:08 +0000 (UTC) Date: Tue, 2 May 2023 14:23:07 +0200 From: Petr Mladek To: Rasmus Villemoes Cc: Konrad =?iso-8859-1?Q?Gr=E4fe?= , Quentin Schulz , Greg Kroah-Hartman , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , 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: 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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2023-04-28 08:56:59, Rasmus Villemoes wrote: > On 27/04/2023 13.51, 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. > > Thinking more about it, I'm not sure this is appropriate, not for a > single user like this. vsprintf() should not and cannot satisfy all > possible string formatting requirements for the whole kernel. The %pX > extensions are convenient for use with printk() and friends where one > needs what in other languages would be "string interpolation" (because > then the caller doesn't need to deal with temporary stack buffers and > pass them as %s arguments), but for single items like this, snprintf() > is not necessarily the right tool for the job. > > In this case, the caller can just as well call string_upper() on the > result I tend to agree with Rasmus. string_upper() is a super-easy solution. One user does not look worth adding all the churn into vsprintf(). Best Regards, Petr