Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp242227rdh; Tue, 13 Feb 2024 15:55:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWMNJhBBurdWBtM450mOVI+jaR6tsoAVZob0Nq0KUsyBGjP35FCgbJBVrNMPxrrNz012VUOTrB/Eyz7YyuKuE1ply7p803AetX2RSAINA== X-Google-Smtp-Source: AGHT+IGAU36SdJ/psw/tLpsDS9hItozR380wB2sA7LYnR1q180WcJthy2FJJYeqJ8k7KExj/+Ids X-Received: by 2002:a05:6402:7d7:b0:561:e966:3a28 with SMTP id u23-20020a05640207d700b00561e9663a28mr882734edy.12.1707868533252; Tue, 13 Feb 2024 15:55:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707868533; cv=pass; d=google.com; s=arc-20160816; b=TBCJj6Ex6dLkqrBdT1W11iqzkJJ/z2CzPhmgOxAmXMgeBvUis+4RLqGbdEr6oZkgtf a4gea/rsFR8lTEEraiZKS6YFBirs8oiRzOm8rBRCtkti/THrRFsZiaTZdDexGEnJOAgx tskfenqqOfFnnqc5EEWMORL8tlrMzk3Kka7FochaRPQ9o0q02xu9eSFW4KkTqkzJAGSR XYCNe5z3VwnX9p9m9Nty8coGvhSIlwuilR3tlzYzJbiwfSXRu4Pi697NT3IBtaQz/xML /rPxlT6cnb6hwmeeGJfiw/TOz+uTGpFTpxtrtx7kJIbEAcHjW8CsBqymvmtMv9AbpXG5 mqOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:dkim-signature:date; bh=7lYndZ54iAip9ue1kfzMMJiei98FQfeXzYAkwe/hBTc=; fh=o+KA26gPeegDXgG3OX+BE5oPMivW95rGbumBnTKVdHg=; b=FcZWyxWnXGG72TZWSdFgKz8jIm7MK9dFIFYd1Wbp/ZhPuounA3VF4lcDPLInzXGLBU Y573tIuOTVS+L1kHnyfNek1td4F+Qolyg0jso4+oKQ8U/ubSL3sv77yrfmPQMYY5OqJ0 q1aY+g7AiDeV/o3VMQjJg0Y78iLhcTcUUt7aJdNg7vJBc/MHvyluDj1KcIg8BxknLYVb PM4EL7+37/YWnwTG1ClLg3DOMlafYbAWGJa6LFClD2h6FBIqjQu1RuGpp7geiPgl0HWD RR+Mh8tq2FF+16LR4UtFeqBn60ojiIN0VMiN9mXP1kA2o+Aa2QmqOLQa53fYVAu9hlrh 6Ghg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ukudvr1a; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-64572-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=2; AJvYcCVdykVLgp4FfuSuaWUYGGWkbQIGbVk6j4T49HYpMh3YRcOjXAmCxoAFw3THKFqg+VO+V4JzdwVn2fFee/tjP0uBSUQXJpskRPR7CIr3mw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b23-20020aa7c917000000b005621780024dsi418044edt.277.2024.02.13.15.55.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 15:55:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64572-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ukudvr1a; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-64572-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 06F611F2424A for ; Tue, 13 Feb 2024 23:55:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C65663417; Tue, 13 Feb 2024 23:55:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ukudvr1a" Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3539633E3 for ; Tue, 13 Feb 2024 23:55:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707868522; cv=none; b=D2PnnNZh9/lupsAnkoXZ76YWLADPghTL6A6PoDC3K1kTrYD2hSEHdlx03ZeS7iv4o4yIrxXdBosznE7jPGuzlLv2kXHMI/0qx/U4tYuYBOA888xaQY7Ra870HzVp8QEN84Bf4Q3NMVb4jDrMmYQPPdfqB4yNUsfUMswg7DDbv1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707868522; c=relaxed/simple; bh=fZOGOODKc95B6ZKSflVqgO2m77JMf3lLtqu8+Vn6yXs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=POqhXHCAUvtUysg7QXURW/Drqmf/O93ORaUcQREZLh3DVa2SENrFcmMpdn9/NcA800SYEwk1Bb4v5jWlBr0/jwbRWXZa+7SrGv6YsNWOysA6H6kbPH7GBLZrOJN+/7L5SkauWvUT/wVkUjDmoZ9Kc2MQY5q/1HYspt8QHvB31nU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ukudvr1a; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Tue, 13 Feb 2024 18:55:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1707868518; 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=7lYndZ54iAip9ue1kfzMMJiei98FQfeXzYAkwe/hBTc=; b=ukudvr1aCEFWsRD5Qc+t69T82wSLiWNggDNNSaihs/+5HsdVi3IiDww/W4Hjipu7Ldjze6 fAlCdelItrMUUTcWWDaTYUW6HpXNtgsbiiEPWXxlSH+7ReEIr0ot/QCNg/6qEL8BJBc7Zy DmTXmD+wnOiL++TyCVx4b0U5F/8chrk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Andy Shevchenko Cc: Suren Baghdasaryan , akpm@linux-foundation.org, 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, 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, vvvvvv@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?Q?Tr=C3=B8nnes?= Subject: Re: [PATCH v3 01/35] lib/string_helpers: Add flags param to string_get_size() Message-ID: References: <20240212213922.783301-1-surenb@google.com> <20240212213922.783301-2-surenb@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 On Tue, Feb 13, 2024 at 10:29:34AM +0200, Andy Shevchenko wrote: > On Tue, Feb 13, 2024 at 10:26 AM Andy Shevchenko > wrote: > > > > On Mon, Feb 12, 2024 at 11:39 PM Suren Baghdasaryan wrote: > > > > > > From: Kent Overstreet > > > > > > The new flags parameter allows controlling > > > - Whether or not the units suffix is separated by a space, for > > > compatibility with sort -h > > > - Whether or not to append a B suffix - we're not always printing > > > bytes. > > And you effectively missed to _add_ the test cases for the modified code. > Formal NAK for this, the rest is discussable, the absence of tests is not. Eh? The core algorihtm for printing out a number in human readable units; that's definitely worth a test, and I assume there already is one - I didn't touch that. But whether or not the units suffix has a space, or a B suffix? That's not going to break in subtle ways; that either works or it doesn't.