From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A152849502C for ; Fri, 21 Aug 2026 13:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787320006; cv=none; b=RcgAYyXH00TvQoEr4iuWPtP7iwf9/SaNKPS9/4E7wj3XaPQqazdaTZ1vcEAjGrOtQSL6MVh+29IO/LboYixP17Xg8wuOw6CHGF/sgLYkvzAzYQt59oGzg2Piu/iep77ToiJiocwayLsVnOxWHBcLIa2uIuT+/t9G8uuA7PSd0TU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787320006; c=relaxed/simple; bh=UwB+F0FHcNSBGG6swZnEH5GGuemVym5TTzxuQgEmrAw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cZDjrPh8yWfBzi+g/UJTjTTZ6PA05/kA0QIxeOQStFNxUvbGjpczuNeetlT9yLlThhCtw16gyOqpifdY7tiYmxwYO9xnzvKeIu78ucPQPrqZV/7FF/dE/jJdWiR0AdrL+Ta9pJT2/4nfWVj86KOPT5KErr300w0WJWOxZrYiuN0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=CX1s8gVb; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="CX1s8gVb" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-c20fb91ed0fso146422866b.3 for ; Fri, 21 Aug 2026 06:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1787320001; x=1787924801; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=eFr5Fl7tzSWyavCPXm9cL7Za53Ty5o305M5CicClyUw=; b=CX1s8gVbwGBoAZ5MITyN3iU/MniHe6hzxW6PkBgVAWBb7KzfhscKrHkOo7Zj6eZGu1 y6gNFNyyIguKjtvxNtwrh/FQHRwlk2gqcjzk9jFH17QgntgGJlWVK91AxwK/TWtJ/Ljz 9Hh7kz9KnOb/hA6VSsTeIuUNxSxiPKGp2HwdPMYl1cm9ThuRY8uSGEee9nShl2Y6Vg+9 1MSUKWITvoMZMX6OZ1cNEcDAmPRdBaxCyK55ClJNaPQPJgdop8FrujOHHGnxNlVl4x2R B+Kwd1DrE8NOHnrv8rfViIRAjzpfMMKS75SGtJYONNjUDwvrGJ7rGuRmchkoBg+8r3F1 c4JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787320001; x=1787924801; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eFr5Fl7tzSWyavCPXm9cL7Za53Ty5o305M5CicClyUw=; b=g0O324xsZZ0t09aobzI0FEjMZxqJvG+/S4KZxj82gK3EI1uE/4XuBcfV0VsZYfUvCH 2US07kXo8zCr59FEWto8U3MjqIYkyyZAakf6HGG9dfUjX2EsI4gZPI0F59BghF1IBVZE j8EiLyRHlKwEPpZsInVkzy/Ng6vc8Rax7vYikRvKUAQpH5IOMLErAtlkheD6mW/LpVDc wB0JJ4pi+SQ8my46SFTGyyRx33RDeh4IovvwqoBLSnn3zfDE9lz0In+jRVFpf8+S8Mwb IQnM5c5OTSMb0Yy4psO8LJTLqtEAcRrQf6WNCe/1UmgyLLFP6fOW75xqqeigzAP/YRao q1Hg== X-Forwarded-Encrypted: i=1; AHgh+RoJMp+9v1SzhkBkdB9qEcVChoTaPuHAqrCz6d7bsE3KnFIzjQJTSZtv4bi6QJYg07Bx2i1zbV6F2XAvoHM=@vger.kernel.org X-Gm-Message-State: AFuF++knLrDLr2kWKTWOUKQkDwVnV1oKOjqTqrrBkYIcGNtyMKv3f+jH UUHpgwkjNcDdzL5ZeN6kK8c+Pqj+q+dqA+OxMi0A/VuKw6qPg84yM6UiZJWMGSSYk5Y= X-Gm-Gg: AR+sD12RxTnC38QnsbyxVAo1DciYTltVtV6x+fsoeWfOhUm5y0ZQebSZvyYWkmvBy/n VPTQokQGhwHaH1K6n2L1K/hD9qISzx1X/GqcK2w8It6TjmFW0Dy4pvD7JzwXK92zrwZ5elD1a48 qMfjiUcm4jMvpedS/ADNEOI4Dr9PuQ6eDSXTMtwfDX26srsU6R2zsa9ZDJYSlSs/QEJ3162/Hri vv+7LsSbpQ6D8anjLsVhFNOgXnggDQsPyXRuViweO+W9XWhatC6M0j1jIh7Baln0XgzZI/Xc0mh t2KitC47sfwpm37kjiOGh5zSgblSUn3u5sdRVXe7zrxYGiiuNr/xpVHvrr1GhWsP1yaHTPThCZy SoofiS9SBGGzcZaV+A7ZpKzDcI0iETDY6BOL6scb2KOlmd98UFuyjlT8LNlcCl/G06ESMe8Tbkx SqKvZ9mHwdukcm7MgkYJDNTteTIeU3XiKZcNTfq0JW0XjLnX4c2PHQxu5EzIUaqA== X-Received: by 2002:a17:907:ea8f:b0:c20:ff26:336e with SMTP id a640c23a62f3a-c246a605cb7mr617167766b.14.1787320001208; Fri, 21 Aug 2026 06:46:41 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c24589e224dsm490000166b.2.2026.08.21.06.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2026 06:46:40 -0700 (PDT) Date: Fri, 21 Aug 2026 15:46:38 +0200 From: Petr Mladek To: Andy Shevchenko Cc: Bjorn Helgaas , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Andrew Morton , Steven Rostedt , Rasmus Villemoes , Sergey Senozhatsky , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH v1 2/2] PCI: Include human-readable sizes in resource assignment messages Message-ID: References: <20260808172308.282591-1-bhelgaas@google.com> <20260808172308.282591-3-bhelgaas@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=us-ascii Content-Disposition: inline In-Reply-To: On Sat 2026-08-08 20:48:00, Andy Shevchenko wrote: > On Sat, Aug 08, 2026 at 12:23:08PM -0500, Bjorn Helgaas wrote: > > Include human-readable sizes, e.g., "16.0 MiB", in addition to the hex > > "0x1000000" size, in resource-related messages. Also consistently include > > the "0x" prefix. > > Instead of repeating many times the %#llx (%s) and accompanying > string_get_size() calls can we rather introduce a (sub-)extension > to %p[R] (perhaps against 'R' to print only size) and use it? I am not sure if I understand it correctly. It looks to me that this patch uses string_get_size() for printing some "arbitrary" size values. Some are not part of struct resources, so using %pRR might be confusing. Unfortunately, implementing a generic printf modifier for printing human readable size is complicated. It should keep the type-size checks. Also it should allow to distinguish binary vs decimal size calculation, for example 1kB vs 1kHz for 1024B vs 1000Hz. See https://lore.kernel.org/all/ZbFd5TZ_pi7q3hso@casper.infradead.org/ Best Regards, Petr