Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp219232rwr; Tue, 2 May 2023 19:19:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5N0ScGJ4NQn1gPhXWzBH/rqPJ/SYaH/ov7rBv6iPD4+4q2VQm9UblT0aIhRTBqZB8dYP/w X-Received: by 2002:a17:90a:ebc5:b0:24e:2021:b410 with SMTP id cf5-20020a17090aebc500b0024e2021b410mr4980375pjb.14.1683080391973; Tue, 02 May 2023 19:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683080391; cv=none; d=google.com; s=arc-20160816; b=gXc2Wk94Z20GudZTKLHoOBKL0VPLl+YHtHR7TnGQK1WmQnhnVEOXZuxMYOHfQA6jHP lp8U0i8q6zRrivk3sTi84A0k9OUeglJV/a0xdq08OZ/NawHV+26HI23yh1LrFrrmg2JY pW6ca7b0ZIOYpNXp8mGDR3yeuPkVobirkOWhGRmmWih/4Ev1EbByzKWjUhZvfYHR2RQ1 gG+g3iPoRpZlk4BjY7KvfDNt6FeMV6s/NF4v8H13Yu6hyvUEUpZe6/l2YNXpEgmrUnxO aMN3YPoZrqQ55iqRmm3AvthUXmdosXVqZXeB3gYxXBx34aOdwOFy0pQGU9QYK75VjHPv +6lw== 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:dkim-signature:date; bh=cpRynykubcluzGzuthbmrNkuNIeg8BzMwNks1+1YuhA=; b=ADvlzuJ9Rh1QH3dfz65XhOKxB4iWOJQ0BTCwQbldcaU1bdC6hQt75JvotHy5evD5u2 xjHu7qjw+0qV+ljccmT4GhTWjWHCjJQQrllI8X6Om2kaafDwbHJTsUmfytIFGzR6kvMp xPjTdolLEIunMGiFoohOYq40xNC+4D7h4fO7llPuEIk+KIIEZEkXRrCQLhJ75QZWxB4u /GeyBi80Myj7sP5dggCoOvkSTo3/pSiaFJG/Ugj1qKlIUcflbsPTY+3YXdUOoVA45iDf TRS8FCfSTpBj3Yb02AMHga074C3gUEKp36tPh9fi32jr3fjA/IVY/UkmPJUflRjU4lyN UleA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=v2LisaB7; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u15-20020a170903124f00b001a677821130si9889971plh.13.2023.05.02.19.19.36; Tue, 02 May 2023 19:19:51 -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=@linux.dev header.s=key1 header.b=v2LisaB7; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229617AbjECCHx (ORCPT + 99 others); Tue, 2 May 2023 22:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjECCHt (ORCPT ); Tue, 2 May 2023 22:07:49 -0400 Received: from out-18.mta1.migadu.com (out-18.mta1.migadu.com [IPv6:2001:41d0:203:375::12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C72A2D5F for ; Tue, 2 May 2023 19:07:38 -0700 (PDT) Date: Tue, 2 May 2023 22:07:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1683079654; h=from:from:reply-to:subject:subject: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=cpRynykubcluzGzuthbmrNkuNIeg8BzMwNks1+1YuhA=; b=v2LisaB7EAiYUc1+uIQeLvUn9sUnaliIsnvchC6IYmBRNpj565Pcae8UgINnbfoPSrDzf1 dhyCKwDr9an9QOzJ3GvxlEwxpH2prnH3+mWfvk7cXKMy3v56CXygiL+SUSayiuSFsOEU6I BkOshCOA3yKQ/GtZDDIOPbmb5F9macw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Andy Shevchenko Cc: James Bottomley , Suren Baghdasaryan , akpm@linux-foundation.org, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, Andy Shevchenko , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , "Michael S. Tsirkin" , Jason Wang , Noralf =?utf-8?B?VHLDr8K/wr1ubmVz?= Subject: Re: [PATCH 01/40] lib/string_helpers: Drop space in string_get_size's output Message-ID: References: <20230501165450.15352-1-surenb@google.com> <20230501165450.15352-2-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Tue, May 02, 2023 at 06:19:27PM +0300, Andy Shevchenko wrote: > On Tue, May 2, 2023 at 9:22 AM Kent Overstreet > wrote: > > On Tue, May 02, 2023 at 08:33:57AM +0300, Andy Shevchenko wrote: > > > Actually instead of producing zillions of variants, do a %p extension > > > to the printf() and that's it. We have, for example, %pt with T and > > > with space to follow users that want one or the other variant. Same > > > can be done with string_get_size(). > > > > God no. > > Any elaboration what's wrong with that? I'm really not a fan of %p extensions in general (they are what people reach for because we can't standardize on a common string output API), but when we'd be passing it bare integers the lack of type safety would be a particularly big footgun. > God no for zillion APIs for almost the same. Today you want space, > tomorrow some other (special) delimiter. No, I just want to delete the space and output numbers the same way everyone else does. And if we are stuck with two string_get_size() functions, %p extensions in no way improve the situation.