[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250311-vsprintf-pcn-v2-0-0af40fc7dee4@bootlin.com>
Date: Tue, 11 Mar 2025 10:21:21 +0100
From: Luca Ceresoli <luca.ceresoli@...tlin.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Petr Mladek <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jonathan Corbet <corbet@....net>, Andrew Morton <akpm@...ux-foundation.org>,
Alex Shi <alexs@...nel.org>, Yanteng Si <si.yanteng@...ux.dev>
Cc: Binbin Zhou <zhoubinbin@...ngson.cn>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>, Liu Ying <victor.liu@....com>,
linux-clk@...r.kernel.org, linux-pm@...r.kernel.org,
linux-rpi-kernel@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
Luca Ceresoli <luca.ceresoli@...tlin.com>
Subject: [PATCH v2 0/2] vsprintf: remove redundant %pCn format specifier
There are two printk format specifiers for clocks: %pC and %pCn, and they
print exactly the same string. Geert confirmed the intended reason for
having two was that %pC would act as a default, like some (but not all)
formats do. However there seem to be no advantage in having two instead of
one, especially now that there is no other %pC specifier since commit
666902e42fd8 ("lib/vsprintf: Remove atomic-unsafe support for %pCr").
Definitely having two without properly documenting they do the same creates
misunderstandings [0].
Since %pCn is used in a single place, replace it with %pC and remove %pCn
to simplify such format specifiers implementation and avoid
misunderstandings.
[0] https://lore.kernel.org/dri-devel/f8df2b5e-b005-4ada-8108-159b2b94a72e@nxp.com/
Signed-off-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
---
Changes in v2:
- Add Chinese translation
- Link to v1: https://lore.kernel.org/r/20250307-vsprintf-pcn-v1-0-df0b2ccf610f@bootlin.com
---
Luca Ceresoli (2):
thermal: bcm2835: use %pC instead of %pCn
vsprintf: remove redundant and unused %pCn format specifier
Documentation/core-api/printk-formats.rst | 3 +--
Documentation/translations/zh_CN/core-api/printk-formats.rst | 3 +--
drivers/thermal/broadcom/bcm2835_thermal.c | 2 +-
lib/vsprintf.c | 10 ++--------
4 files changed, 5 insertions(+), 13 deletions(-)
---
base-commit: 4d872d51bc9d7b899c1f61534e3dbde72613f627
change-id: 20250307-vsprintf-pcn-8a43e3b0d43e
Best regards,
--
Luca Ceresoli <luca.ceresoli@...tlin.com>
Powered by blists - more mailing lists