From patchwork Mon Dec 22 11:56:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1038 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766404641; bh=Y2vfsbwFvvU2MM0auscvPsx7vRl8YZyWWKrI2JHw6KA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IfCG+Y17zlWh8fva6ju/SeAHPjSIL9HUGzHdnr+1jmZqum6O/4KYahcIP+PO2NaWg n47ce0XPELtC0/xHk9v2sVsFvQe3AWSHB7y2oTpAJIQT4YAGtd0jxSOS9J2yrADO4y 2fLHNrpN8l3uGR9gWVa7WW9RYS4OIJlzJvKpfFWSBK08agwGSxZnQyPNsPOdg3se+e l/JD/7z/5TVKGRt5hTbAGC9RtnOG6rkrN6D9cY3cb2pSZEIzqFU9cbqCS50+I9Ar8q hUX4fYq6drB6/8rT92YFXnPYt4V0/SUi7WihsLdbsieIbUYOpWCxlI7AcMxDdfMY3n XU/dR0ULN34Yw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C47F464D62 for ; Mon, 22 Dec 2025 04:57:21 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Ci5a4RHlUE-i for ; Mon, 22 Dec 2025 04:57:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766404641; bh=Y2vfsbwFvvU2MM0auscvPsx7vRl8YZyWWKrI2JHw6KA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IfCG+Y17zlWh8fva6ju/SeAHPjSIL9HUGzHdnr+1jmZqum6O/4KYahcIP+PO2NaWg n47ce0XPELtC0/xHk9v2sVsFvQe3AWSHB7y2oTpAJIQT4YAGtd0jxSOS9J2yrADO4y 2fLHNrpN8l3uGR9gWVa7WW9RYS4OIJlzJvKpfFWSBK08agwGSxZnQyPNsPOdg3se+e l/JD/7z/5TVKGRt5hTbAGC9RtnOG6rkrN6D9cY3cb2pSZEIzqFU9cbqCS50+I9Ar8q hUX4fYq6drB6/8rT92YFXnPYt4V0/SUi7WihsLdbsieIbUYOpWCxlI7AcMxDdfMY3n XU/dR0ULN34Yw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B083F64CCE for ; Mon, 22 Dec 2025 04:57:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766404639; bh=zJkzr6wbAKlxV+AMxr4/HJbXE/0CqhcVG7lNkXufWQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rdC9FZh+21GXAC+4b4Tdw3En0m6CxMC3z95VVwU17SnYK0Qm72BCcuG1gWcc6dnBu ab39eMTCGUCXwNe+6TEyRagiAeY7J+9U9Fg1PQTl6/1DFnAfTDBULQfD9tgNmCiQ8t XolZBelTStVJZV6a8cD7FCbJ+D0cN4eZBp5ZXqVFW9PchqYtiYLXsQTN25vNo4x3sd DgRlaePxZXoFKLvKyaJfn/PIvVzKAVJHw0iDIPbeE+RL9K+mZSn0HhdmRKbGzJxZLu UDQ0QH50jeTkXrnA1Z0ZlgKrptHmryjEGK5YnLnplsI3D7GWjoqAZuEPdnNRhq5FQf uu14gOae101wg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D95EC5FB5A; Mon, 22 Dec 2025 04:57:19 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id CRH6270fcFil; Mon, 22 Dec 2025 04:57:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766404633; bh=7Hi0ValM6Z+hG+Ri/k5SxuheuYPBVHfExCVNlo/OgEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O7C3tDnVQrilgTCC5Q3e4t8ta7A1zj0bBo66eB6FKHNiiR6kBZgI29LUw9KpTbOp8 0X5BV2mv5dIXqE6B6fnEQHDb3Xs1oNezQPMgxoFpfTk5CXyg1DiokycgY9rlKy3MY7 7r9qEVDvW0GOT5zKQpVItpLxx39n9i+PBng4pnusxvghMfrPrxWizYsx2a4EFnzR3D w/odCFRUuaLZ22vFs78Mf6lOM0EfpLRbLbE8iAYQEuiguRwYqqy/OpOo8qmPNCBDfq RNQIbrbLLYVS63i6YuQp3eHIavLqQn+7nfJ+8a9D1zsQl+Rh2Qz7phL1y7DONSmgnn gVz+bHhEB3UTg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3918564D71; Mon, 22 Dec 2025 04:57:13 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 22 Dec 2025 04:56:12 -0700 Message-ID: <20251222115639.700578-9-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251222115639.700578-1-sjg@u-boot.org> References: <20251222115639.700578-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RIRS4TACQJBWJYXWWPG76SPLCV44EQXY X-Message-ID-Hash: RIRS4TACQJBWJYXWWPG76SPLCV44EQXY X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 08/26] linux: printk: Fix KERN_* macros for string concatenation List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Change KERN_* macros from empty definitions to empty strings (""). This fixes string concatenation in printf-style calls like: printk(KERN_ERR "message") Without this fix, KERN_ERR expands to nothing and the string concatenation fails. Co-developed-by: Claude Signed-off-by: Simon Glass --- include/linux/printk.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index edf149f52c7..00452944c48 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -5,15 +5,15 @@ #include #include -#define KERN_EMERG -#define KERN_ALERT -#define KERN_CRIT -#define KERN_ERR -#define KERN_WARNING -#define KERN_NOTICE -#define KERN_INFO -#define KERN_DEBUG -#define KERN_CONT +#define KERN_EMERG "" +#define KERN_ALERT "" +#define KERN_CRIT "" +#define KERN_ERR "" +#define KERN_WARNING "" +#define KERN_NOTICE "" +#define KERN_INFO "" +#define KERN_DEBUG "" +#define KERN_CONT "" #define printk(fmt, ...) \ printf(fmt, ##__VA_ARGS__)