Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5730992rwr; Mon, 1 May 2023 09:55:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Lwu4WtkDciEkTIyIz8djeF5K1aLjKHnbWiQNOy12GbZqOnpo2yhl5/p+9yE9gB0yxZ/dT X-Received: by 2002:a05:6a00:1949:b0:641:2d72:562 with SMTP id s9-20020a056a00194900b006412d720562mr16078366pfk.13.1682960158152; Mon, 01 May 2023 09:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682960158; cv=none; d=google.com; s=arc-20160816; b=lKlvnsjh3+Ls4D3uSB+iHp6YgfQwVNippXLmNosIn/Sj1Ldc0tbo3P4LB9QKweWbys fxJwVY9IKipB/PIYPqLWY1jHb96DzQ99Q+GJic4ZLQBzpTLLZBqFFj6E7dWqz3gFdOaF 3xKXYIagZXLbBvY6yuH1zXtWsR9nStpgsaBoXK2WD1ssVbr/jK8rh0AztPLAsy9RSqa1 l6/ObCDmhRdKBdwCnWEMwQS2rckUorQca3DWn6jTioapyTTTN9eg5Hq6KdK9afrByKdY 1ULY1OPQ6jfglNLFLqBhAF/Zh3yy9Am/8+uWhVPJTKV3Eji+WN04iBgdkOQfflJX0idj UMLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:dkim-signature; bh=tgVoyGNNM2CEwgGlnNhwRO5zW+BCSfKlhykn/JkHIoY=; b=srlDAPvBi9s5aZdFwpEsN13JYo4uaMbfzKrbn4dER2kbLUwGgYUNVFwkIFYKR3zeRc c/E8Nk6Xfmjwwiygc2SVizI1MTrRL42dTicjsq7nZh4OuiT7uBMnjuGrgjczE7VAEfXK H7Y3sx+kdQn3Vx9bD1LQ2V8hj5moZam3Ii8pgeeP446Jv9Jga+07qyjCTWVMCkmNzVLt rDPG2smruMY4JCrBp2nf+my2TwvEUWKLTBjlSFJNFSg7GQRIWO/tlQ9lPZSkH6HIDN7z ddAnD7rthqHRe6WiBZDii02NGTgjpCOYKuClezPvTnUwqNDcIIwCa06CfamCY7jWCzt6 6gFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=2YKjiLNW; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020aa79547000000b0063d40888f69si28377498pfq.223.2023.05.01.09.55.43; Mon, 01 May 2023 09:55:58 -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=@google.com header.s=20221208 header.b=2YKjiLNW; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232653AbjEAQzc (ORCPT + 99 others); Mon, 1 May 2023 12:55:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232556AbjEAQzM (ORCPT ); Mon, 1 May 2023 12:55:12 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C99B1719 for ; Mon, 1 May 2023 09:55:10 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-24e02410034so1197079a91.0 for ; Mon, 01 May 2023 09:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682960110; x=1685552110; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=tgVoyGNNM2CEwgGlnNhwRO5zW+BCSfKlhykn/JkHIoY=; b=2YKjiLNW+kfuA2PzlgEprNmYD56U2DvqAYUQT3SxKi2Wkcms/FURL1MvVV4lKJqj8O 6/Ns7jrOtbP8ic5/FVYS4laNGQMz7H1sQUQlCcm/XRw/h77Gbtg2COyXGd2xvroS0fJn qwWPXD+NTjhYN8F2PIhFlV9xM7/YRbLeL8oWUbHvCo0bmT2YG7Au7XFXE7JF9tMEE+O2 Razpx64/yqsX3p0ZTAuL1qwvem7fqbeaFnGoyPVJo12mzY/mv/yC7mdLiyEupHVMtu6T xYmQq3px4UJy+E+76my+C+5ib12oMdQjlgTcOmFRh/w96xFVezYHyxkBpY3bPmKf/8tt YK/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682960110; x=1685552110; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=tgVoyGNNM2CEwgGlnNhwRO5zW+BCSfKlhykn/JkHIoY=; b=Ph00Oi4mQ1ZHPj/6k09TozZ0NWkS2w+iwOMsrKR4ydgv4AxhPcu6kdpk3CDXAKLeo0 +TFPkHePn1yPHX0FcOwl05y0zDxTNr36BXuZLuUZRT1qlf2gV0o5j/+NRPWNgfGYHXq2 R9e1RIOUcx63G0nE6Bmzo/EE8gZRXZJ5we63M8+dPXcBnWAHU4VQv3xjay2WYFSOxKIf LePdrlU/oSVb86Xn+ep8GQr9x1r8GY6mKzYtnQVH7R65SNBNtt+iNNcheAx55J+uJXmx H8SxDttlE5n3C5J21oTs5tGcIUqd3YzdL+UfnG9Sn32HxTouYaSuIkHfHe+FQkobCaxL quGg== X-Gm-Message-State: AC+VfDxmAWmOz1v3xX2RQLZFDeL4oSw/hj255zv7qi6wICNRKcrrw+gK 1HdUf/tdA3znnYTiaQZY+wIfqMZF2L0= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:6d24:3efd:facc:7ac4]) (user=surenb job=sendgmr) by 2002:a17:90a:390d:b0:246:66d6:f24e with SMTP id y13-20020a17090a390d00b0024666d6f24emr3850182pjb.2.1682960109840; Mon, 01 May 2023 09:55:09 -0700 (PDT) Date: Mon, 1 May 2023 09:54:11 -0700 In-Reply-To: <20230501165450.15352-1-surenb@google.com> Mime-Version: 1.0 References: <20230501165450.15352-1-surenb@google.com> X-Mailer: git-send-email 2.40.1.495.gc816e09b53d-goog Message-ID: <20230501165450.15352-2-surenb@google.com> Subject: [PATCH 01/40] lib/string_helpers: Drop space in string_get_size's output From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, 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, surenb@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?q?Noralf=20Tr=C3=B8nnes?=" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 From: Kent Overstreet Previously, string_get_size() outputted a space between the number and the units, i.e. 9.88 MiB This changes it to 9.88MiB which allows it to be parsed correctly by the 'sort -h' command. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan Cc: Andy Shevchenko Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: "Noralf Tr=C3=B8nnes" Cc: Jens Axboe --- lib/string_helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/string_helpers.c b/lib/string_helpers.c index 230020a2e076..593b29fece32 100644 --- a/lib/string_helpers.c +++ b/lib/string_helpers.c @@ -126,8 +126,7 @@ void string_get_size(u64 size, u64 blk_size, const enum= string_size_units units, else unit =3D units_str[units][i]; =20 - snprintf(buf, len, "%u%s %s", (u32)size, - tmp, unit); + snprintf(buf, len, "%u%s%s", (u32)size, tmp, unit); } EXPORT_SYMBOL(string_get_size); =20 --=20 2.40.1.495.gc816e09b53d-goog