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 C7340C77B73 for ; Tue, 2 May 2023 05:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233525AbjEBFek (ORCPT ); Tue, 2 May 2023 01:34:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233519AbjEBFeg (ORCPT ); Tue, 2 May 2023 01:34:36 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CCAB40DD; Mon, 1 May 2023 22:34:35 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-5f45fad3be1so30437386d6.0; Mon, 01 May 2023 22:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683005674; x=1685597674; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Qrcuuma9akhRKA9cVsiv9Wp3Fts3/L+OpcqEI96PfXk=; b=QF1HVjPTepvbrQ9oJRLkb6f8AJvX+hO2zQE2ZY/l3fUgEFOfqL1wf8m0RGFQ4awGlN sWkxd9j28poLLl8dBgEc54m1kLx91P31/J3vbCIAx0/CoGXAsbwCOE363uYJGP9GkB5b 3lymi+vNqj9QoS17H6nGkbM5o+IGDFDB9cd/G6K1hJSdkvWt972kMNAdb/+wzno7m9jZ f0XwZxnSXtuHXZc3vW87bizP3VIj3Spc6/Cesx4fCw9piQPSAItNDleA+xpCa+67Mn+G vzbu6giNBfMNRicZ3wSxkGrbLyqmcdrr5AdLiwR1ViUDz037I1qTRRGrjMrCbz3a2XiY 9TDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683005674; x=1685597674; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qrcuuma9akhRKA9cVsiv9Wp3Fts3/L+OpcqEI96PfXk=; b=aSE8tbD0/3vqzvoIlK7v8nw454064FFpohwnHCAJT/TmfNuS/HioLhubgjbYomF8vi RDbPtyu5yRItJAt/ziDoYJEbnz34Jk+YpOrePJcBGq92iRdHGnvr+DxIvbaMPgBGub3V 5QCTyV13EW48DvD8BHqewTp1qRde4IKSJvSjZVUw44KlmVZUXsCU198pmq/FOcgPQYcl z5nuc3egP2nNiO8CZgik1jZAThO5VJXTN1GwcfBl1lxGpznlzUfJ1xTVcviSdRqPxw3k URoWeZomVpufLp+hcdLUKK0sQo8/BBZgBNfkco7VC0cnuREBu0dms8AA7YWJJaNj3byV 9cxw== X-Gm-Message-State: AC+VfDzNBIlQEUtnfdULqB97tvctAPuFt2bG2Oywxj/B4YxgPuzS2/+6 4cgFi2DfsRjMeGOpS9V8skc473k70MP7/cKwQg4= X-Google-Smtp-Source: ACHHUZ6UI2cU+vYPscYDDBkkT3Plhp9qvN6okFjmkrVKfQQGe2MFQv7qiNq0uAhkrc7LvrOfXehK4e+SQ+W+CPsbV3k= X-Received: by 2002:a05:6214:d04:b0:56e:aeaa:95b2 with SMTP id 4-20020a0562140d0400b0056eaeaa95b2mr3054068qvh.9.1683005674261; Mon, 01 May 2023 22:34:34 -0700 (PDT) MIME-Version: 1.0 References: <20230501165450.15352-1-surenb@google.com> <20230501165450.15352-2-surenb@google.com> In-Reply-To: From: Andy Shevchenko Date: Tue, 2 May 2023 08:33:57 +0300 Message-ID: Subject: Re: [PATCH 01/40] lib/string_helpers: Drop space in string_get_size's output To: Kent Overstreet 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 , =?UTF-8?B?Tm9yYWxmIFRyw6/Cv8K9bm5lcw==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, May 2, 2023 at 6:18=E2=80=AFAM Kent Overstreet wrote: > On Mon, May 01, 2023 at 10:22:18PM -0400, James Bottomley wrote: ... > > > If someone raises a specific objection we'll do something different, > > > otherwise I think standardizing on what userspace tooling already > > > parses is a good idea. > > > > If you want to omit the space, why not simply add your own variant? A > > string_get_size_nospace() which would use most of the body of this one > > as a helper function but give its own snprintf format string at the > > end. It's only a couple of lines longer as a patch and has the bonus > > that it definitely wouldn't break anything by altering an existing > > output. > > I'm happy to do that - I just wanted to post this version first to see > if we can avoid the fragmentation and do a bit of standardizing with > how everything else seems to do that. 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(). --=20 With Best Regards, Andy Shevchenko