Skip to contentSkip to conversation

dibs: Remove KMSG_COMPONENT macro

PATCH Applied Heiko Carstens 3 participants 3 messages Nov 26, 2025 – Nov 28, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dibs: Remove KMSG_COMPONENT macro

The KMSG_COMPONENT macro is a leftover of the s390 specific "kernel message catalog" from 2008 [1] which never made it upstream.

The macro was added to s390 code to allow for an out-of-tree patch which used this to generate unique message ids. Also this out-of-tree doesn't exist anymore.

The pattern of how the KMSG_COMPONENT is used was partially also used for non s390 specific code, for whatever reasons.

Remove the macro in order to get rid of a pointless indirection.

[1] https://lwn.net/Articles/292650/

---
 drivers/dibs/dibs_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dibs/dibs_main.c +1 -2
index dac14d843af7..b8c16586706c 100644
@@ -6,8 +6,7 @@
  *
  *  Copyright IBM Corp. 2025
  */
-#define KMSG_COMPONENT "dibs"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "dibs: " fmt
 
 #include <linux/module.h>
 #include <linux/types.h>
Signature · 1 line
2.51.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines · Heiko Carstens

The KMSG_COMPONENT macro is a leftover of the s390 specific "kernel message catalog" from 2008 [1] which never made it upstream.

The macro was added to s390 code to allow for an out-of-tree patch which used this to generate unique message ids. Also this out-of-tree doesn't exist anymore.

The pattern of how the KMSG_COMPONENT is used was partially also used for non s390 specific code, for whatever reasons.

Remove the macro in order to get rid of a pointless indirection.

[1] https://lwn.net/Articles/292650/

---
 drivers/dibs/dibs_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dibs/dibs_main.c +0 -0
index dac14d843af7..b8c16586706c 100644

drivers/dibs/dibs_main.c line 12

Quoted 9 lines
drivers/dibs/dibs_main.c +1 -2
@@ -6,8 +6,7 @@
  *
  *  Copyright IBM Corp. 2025
  */
-#define KMSG_COMPONENT "dibs"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "dibs: " fmt
 
 #include <linux/module.h>
 #include <linux/types.h>
#2 lore raw
In reply to Heiko Carstens
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 26 Nov 2025 15:22:42 +0100 you wrote:

The KMSG_COMPONENT macro is a leftover of the s390 specific "kernel message catalog" from 2008 [1] which never made it upstream.

The macro was added to s390 code to allow for an out-of-tree patch which used this to generate unique message ids. Also this out-of-tree doesn't exist anymore.

[...]

Here is the summary with links:
- [net-next] dibs: Remove KMSG_COMPONENT macro

    https://git.kernel.org/netdev/net-next/c/4636b4e797f7

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html