Skip to contentSkip to conversation

net: Remove KMSG_COMPONENT macro

PATCH Applied Heiko Carstens 7 participants 8 messages Nov 26, 2025 – Nov 29, 2025

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

PATCH 1/1 net: 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 patch doesn't exist anymore.

The pattern of how the KMSG_COMPONENT macro is used can also be found at some non s390 specific code, for whatever reasons. Besides adding an indirection it is unused.

Remove the macro in order to get rid of a pointless indirection. Replace all users with the string it defines. In all cases this leads to a simple replacement like this:

- #define KMSG_COMPONENT "af_iucv"
- #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+ #define pr_fmt(fmt) "af_iucv: " fmt

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

---
 net/iucv/af_iucv.c                      | 3 +--
 net/iucv/iucv.c                         | 3 +--
 net/netfilter/ipvs/ip_vs_app.c          | 3 +--
 net/netfilter/ipvs/ip_vs_conn.c         | 3 +--
 net/netfilter/ipvs/ip_vs_core.c         | 3 +--
 net/netfilter/ipvs/ip_vs_ctl.c          | 3 +--
 net/netfilter/ipvs/ip_vs_dh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_est.c          | 3 +--
 net/netfilter/ipvs/ip_vs_fo.c           | 3 +--
 net/netfilter/ipvs/ip_vs_ftp.c          | 3 +--
 net/netfilter/ipvs/ip_vs_lblc.c         | 3 +--
 net/netfilter/ipvs/ip_vs_lblcr.c        | 3 +--
 net/netfilter/ipvs/ip_vs_lc.c           | 3 +--
 net/netfilter/ipvs/ip_vs_mh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_nfct.c         | 3 +--
 net/netfilter/ipvs/ip_vs_nq.c           | 3 +--
 net/netfilter/ipvs/ip_vs_ovf.c          | 3 +--
 net/netfilter/ipvs/ip_vs_pe.c           | 3 +--
 net/netfilter/ipvs/ip_vs_pe_sip.c       | 3 +--
 net/netfilter/ipvs/ip_vs_proto.c        | 3 +--
 net/netfilter/ipvs/ip_vs_proto_ah_esp.c | 3 +--
 net/netfilter/ipvs/ip_vs_proto_tcp.c    | 3 +--
 net/netfilter/ipvs/ip_vs_proto_udp.c    | 3 +--
 net/netfilter/ipvs/ip_vs_rr.c           | 3 +--
 net/netfilter/ipvs/ip_vs_sched.c        | 3 +--
 net/netfilter/ipvs/ip_vs_sed.c          | 3 +--
 net/netfilter/ipvs/ip_vs_sh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_sync.c         | 3 +--
 net/netfilter/ipvs/ip_vs_twos.c         | 3 +--
 net/netfilter/ipvs/ip_vs_wlc.c          | 3 +--
 net/netfilter/ipvs/ip_vs_wrr.c          | 3 +--
 net/netfilter/ipvs/ip_vs_xmit.c         | 3 +--
 net/smc/af_smc.c                        | 3 +--
 33 files changed, 33 insertions(+), 66 deletions(-)
net/iucv/af_iucv.c +1 -2
index a4f1df92417d..1e62fbc22cb7 100644
@@ -10,8 +10,7 @@
  *		Ursula Braun <[email protected]>
  */
 
-#define KMSG_COMPONENT "af_iucv"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "af_iucv: " fmt
 
 #include <linux/filter.h>
 #include <linux/module.h>
net/iucv/iucv.c +1 -2
index 008be0abe3a5..da2af413c89d 100644
@@ -20,8 +20,7 @@
  *    CP Programming Service, IBM document # SC24-5760
  */
 
-#define KMSG_COMPONENT "iucv"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "iucv: " fmt
 
 #include <linux/kernel_stat.h>
 #include <linux/export.h>
net/netfilter/ipvs/ip_vs_app.c +1 -2
index fdacbc3c15be..d54d7da58334 100644
@@ -13,8 +13,7 @@
  * Author:	Juan Jose Ciarlante, <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_conn.c +1 -2
index 37ebb0cb62b8..50cc492c7553 100644
@@ -17,8 +17,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/interrupt.h>
 #include <linux/in.h>
net/netfilter/ipvs/ip_vs_core.c +1 -2
index 5ea7ab8bf4dc..90d56f92c0f6 100644
@@ -19,8 +19,7 @@
  *	Harald Welte			don't use nfcache
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ctl.c +1 -2
index 4c8fa22be88a..068702894377 100644
@@ -13,8 +13,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/init.h>
net/netfilter/ipvs/ip_vs_dh.c +1 -2
index 75f4c231f4a0..bb7aca4601ff 100644
@@ -30,8 +30,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_est.c +1 -2
index 93a925f1ed9b..77f4f637ff67 100644
@@ -12,8 +12,7 @@
  *              get_stats()) do the per cpu summing.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/jiffies.h>
net/netfilter/ipvs/ip_vs_fo.c +1 -2
index ab117e5bc34e..d657b47c6511 100644
@@ -8,8 +8,7 @@
  *     Kenny Mathis            :     added initial functionality based on weight
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ftp.c +1 -2
index 206c6700e200..b315c608fda4 100644
@@ -16,8 +16,7 @@
  * Author:	Wouter Gadeyne
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
net/netfilter/ipvs/ip_vs_lblc.c +1 -2
index 156181a3bacd..e6c8ed0c92f6 100644
@@ -34,8 +34,7 @@
  * me to write this module.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_lblcr.c +1 -2
index a021e6aba3d7..a25cf7bb6185 100644
@@ -32,8 +32,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/module.h>
net/netfilter/ipvs/ip_vs_lc.c +1 -2
index c2764505e380..38cc38c5d8bb 100644
@@ -9,8 +9,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_mh.c +1 -2
index e3d7f5c879ce..f61f54004c9e 100644
@@ -17,8 +17,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_nfct.c +1 -2
index 08adcb222986..81974f69e5bb 100644
@@ -30,8 +30,7 @@
  * PASV response can not be NAT-ed) but Active FTP should work
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/types.h>
net/netfilter/ipvs/ip_vs_nq.c +1 -2
index ed7f5c889b41..ada158c610ce 100644
@@ -26,8 +26,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ovf.c +1 -2
index c7708b809700..c5c67df80a0b 100644
@@ -12,8 +12,7 @@
  * active connections
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_pe.c +1 -2
index 166c669f0763..3035079ebd99 100644
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/spinlock.h>
net/netfilter/ipvs/ip_vs_pe_sip.c +1 -2
index e4ce1d9a63f9..85f31d71e29a 100644
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_proto.c +1 -2
index a9fd1d3fc2cb..fd9dbca24c85 100644
@@ -8,8 +8,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_proto_ah_esp.c +1 -2
index 89602c16f6b6..44e14acc187e 100644
@@ -6,8 +6,7 @@
  *		Wensong Zhang <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/in.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_proto_tcp.c +1 -2
index 7da51390cea6..f68a1533ee45 100644
@@ -13,8 +13,7 @@
  *              protocol ip_vs_proto_data and is handled by netns
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_proto_udp.c +1 -2
index 68260d91c988..0f0107c80dd2 100644
@@ -9,8 +9,7 @@
  *              Network name space (netns) aware.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/in.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_rr.c +1 -2
index 6baa34dff9f0..4125ee561cdc 100644
@@ -14,8 +14,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_sched.c +1 -2
index d4903723be7e..c6e421c4e299 100644
@@ -12,8 +12,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/spinlock.h>
net/netfilter/ipvs/ip_vs_sed.c +1 -2
index a46f99a56618..245a323c84cd 100644
@@ -30,8 +30,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_sh.c +1 -2
index 92e77d7a6b50..0e85e07e23b9 100644
@@ -32,8 +32,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_sync.c +1 -2
index 5a0c6f42bd8f..54dd1514ac45 100644
@@ -32,8 +32,7 @@
  *					Persistence support, fwmark and time-out.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_twos.c +1 -2
index 8d5419edde50..dbb7f5fd4688 100644
@@ -4,8 +4,7 @@
  * Authors:     Darby Payne <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/module.h>
net/netfilter/ipvs/ip_vs_wlc.c +1 -2
index 9fa500927c0a..9da445ca09a1 100644
@@ -14,8 +14,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_wrr.c +1 -2
index 85ce0d04afac..99f09cbf2d9b 100644
@@ -13,8 +13,7 @@
  *                                    with weight 0 when all weights are zero
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_xmit.c +1 -2
index 95af252b2939..3162ce3c2640 100644
@@ -21,8 +21,7 @@
  * - the only place where we can see skb->sk != NULL
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
net/smc/af_smc.c +1 -2
index e388de8dca09..f97f77b041d9 100644
@@ -16,8 +16,7 @@
  *              based on prototype from Frank Blaschka
  */
 
-#define KMSG_COMPONENT "smc"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "smc: " fmt
 
 #include <linux/module.h>
 #include <linux/socket.h>
Signature · 1 line
2.51.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 19 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 patch doesn't exist anymore.

The pattern of how the KMSG_COMPONENT macro is used can also be found at some non s390 specific code, for whatever reasons. Besides adding an indirection it is unused.

Remove the macro in order to get rid of a pointless indirection. Replace all users with the string it defines. In all cases this leads to a simple replacement like this:

- #define KMSG_COMPONENT "af_iucv"
- #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+ #define pr_fmt(fmt) "af_iucv: " fmt

Quoted 6 lines

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

---
 net/iucv/af_iucv.c                      | 3 +--
 net/iucv/iucv.c                         | 3 +--

For net/iucv:

maintainer
#2 lore raw
In reply to Heiko Carstens
Quoted 4 lines · On Wed, 26 Nov 2025 15:07:05 +0100 Heiko Carstens wrote:
 net/iucv/af_iucv.c                      | 3 +--
 net/iucv/iucv.c                         | 3 +--
 net/netfilter/ipvs/ip_vs_app.c          | 3 +--
 net/netfilter/ipvs/ip_vs_conn.c         | 3 +--

Jozsef, Pablo, should we ask the author to split this up or just apply as is?

#3 lore raw

Hi Jakub,

Quoted 7 lines · Jakub Kicinski
Quoted 4 lines · On Wed, 26 Nov 2025 15:07:05 +0100 Heiko Carstens wrote:
 net/iucv/af_iucv.c                      | 3 +--
 net/iucv/iucv.c                         | 3 +--
 net/netfilter/ipvs/ip_vs_app.c          | 3 +--
 net/netfilter/ipvs/ip_vs_conn.c         | 3 +--

Jozsef, Pablo, should we ask the author to split this up or just apply as is?

Patch looks trivial, and not so large for a tree wide.

But I'm Cc'ing Julian Anastasov so he has a chance to ack the IPVS bits.

maintainer
#4 lore raw
Quoted 7 lines · On Fri, 28 Nov 2025 11:53:40 +0000 Pablo Neira Ayuso wrote:
Quoted 6 lines · Jakub Kicinski
Quoted 4 lines · On Wed, 26 Nov 2025 15:07:05 +0100 Heiko Carstens wrote:
 net/iucv/af_iucv.c                      | 3 +--
 net/iucv/iucv.c                         | 3 +--
 net/netfilter/ipvs/ip_vs_app.c          | 3 +--
 net/netfilter/ipvs/ip_vs_conn.c         | 3 +--  
Quoted 5 lines
Quoted 1 line

Jozsef, Pablo, should we ask the author to split this up or just apply as is?

Patch looks trivial, and not so large for a tree wide.

But I'm Cc'ing Julian Anastasov so he has a chance to ack the IPVS bits.

Oops, my bad, I also meant Julian not Jozsef, sorry.

maintainer Acked-by on v1 1/1
#5 lore raw
In reply to Heiko Carstens

Hello,

Quoted 15 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 patch doesn't exist anymore.

The pattern of how the KMSG_COMPONENT macro is used can also be found at some non s390 specific code, for whatever reasons. Besides adding an indirection it is unused.

Remove the macro in order to get rid of a pointless indirection. Replace all users with the string it defines. In all cases this leads to a simple replacement like this:

Quoted 7 lines

- #define KMSG_COMPONENT "af_iucv"
- #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+ #define pr_fmt(fmt) "af_iucv: " fmt

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

IPVS part looks good to me, thanks!

Quoted 496 lines
---
 net/iucv/af_iucv.c                      | 3 +--
 net/iucv/iucv.c                         | 3 +--
 net/netfilter/ipvs/ip_vs_app.c          | 3 +--
 net/netfilter/ipvs/ip_vs_conn.c         | 3 +--
 net/netfilter/ipvs/ip_vs_core.c         | 3 +--
 net/netfilter/ipvs/ip_vs_ctl.c          | 3 +--
 net/netfilter/ipvs/ip_vs_dh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_est.c          | 3 +--
 net/netfilter/ipvs/ip_vs_fo.c           | 3 +--
 net/netfilter/ipvs/ip_vs_ftp.c          | 3 +--
 net/netfilter/ipvs/ip_vs_lblc.c         | 3 +--
 net/netfilter/ipvs/ip_vs_lblcr.c        | 3 +--
 net/netfilter/ipvs/ip_vs_lc.c           | 3 +--
 net/netfilter/ipvs/ip_vs_mh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_nfct.c         | 3 +--
 net/netfilter/ipvs/ip_vs_nq.c           | 3 +--
 net/netfilter/ipvs/ip_vs_ovf.c          | 3 +--
 net/netfilter/ipvs/ip_vs_pe.c           | 3 +--
 net/netfilter/ipvs/ip_vs_pe_sip.c       | 3 +--
 net/netfilter/ipvs/ip_vs_proto.c        | 3 +--
 net/netfilter/ipvs/ip_vs_proto_ah_esp.c | 3 +--
 net/netfilter/ipvs/ip_vs_proto_tcp.c    | 3 +--
 net/netfilter/ipvs/ip_vs_proto_udp.c    | 3 +--
 net/netfilter/ipvs/ip_vs_rr.c           | 3 +--
 net/netfilter/ipvs/ip_vs_sched.c        | 3 +--
 net/netfilter/ipvs/ip_vs_sed.c          | 3 +--
 net/netfilter/ipvs/ip_vs_sh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_sync.c         | 3 +--
 net/netfilter/ipvs/ip_vs_twos.c         | 3 +--
 net/netfilter/ipvs/ip_vs_wlc.c          | 3 +--
 net/netfilter/ipvs/ip_vs_wrr.c          | 3 +--
 net/netfilter/ipvs/ip_vs_xmit.c         | 3 +--
 net/smc/af_smc.c                        | 3 +--
 33 files changed, 33 insertions(+), 66 deletions(-)
net/iucv/af_iucv.c +1 -2
index a4f1df92417d..1e62fbc22cb7 100644
@@ -10,8 +10,7 @@
  *		Ursula Braun <[email protected]>
  */
 
-#define KMSG_COMPONENT "af_iucv"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "af_iucv: " fmt
 
 #include <linux/filter.h>
 #include <linux/module.h>
net/iucv/iucv.c +1 -2
index 008be0abe3a5..da2af413c89d 100644
@@ -20,8 +20,7 @@
  *    CP Programming Service, IBM document # SC24-5760
  */
 
-#define KMSG_COMPONENT "iucv"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "iucv: " fmt
 
 #include <linux/kernel_stat.h>
 #include <linux/export.h>
net/netfilter/ipvs/ip_vs_app.c +1 -2
index fdacbc3c15be..d54d7da58334 100644
@@ -13,8 +13,7 @@
  * Author:	Juan Jose Ciarlante, <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_conn.c +1 -2
index 37ebb0cb62b8..50cc492c7553 100644
@@ -17,8 +17,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/interrupt.h>
 #include <linux/in.h>
net/netfilter/ipvs/ip_vs_core.c +1 -2
index 5ea7ab8bf4dc..90d56f92c0f6 100644
@@ -19,8 +19,7 @@
  *	Harald Welte			don't use nfcache
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ctl.c +1 -2
index 4c8fa22be88a..068702894377 100644
@@ -13,8 +13,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/init.h>
net/netfilter/ipvs/ip_vs_dh.c +1 -2
index 75f4c231f4a0..bb7aca4601ff 100644
@@ -30,8 +30,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_est.c +1 -2
index 93a925f1ed9b..77f4f637ff67 100644
@@ -12,8 +12,7 @@
  *              get_stats()) do the per cpu summing.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/jiffies.h>
net/netfilter/ipvs/ip_vs_fo.c +1 -2
index ab117e5bc34e..d657b47c6511 100644
@@ -8,8 +8,7 @@
  *     Kenny Mathis            :     added initial functionality based on weight
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ftp.c +1 -2
index 206c6700e200..b315c608fda4 100644
@@ -16,8 +16,7 @@
  * Author:	Wouter Gadeyne
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
net/netfilter/ipvs/ip_vs_lblc.c +1 -2
index 156181a3bacd..e6c8ed0c92f6 100644
@@ -34,8 +34,7 @@
  * me to write this module.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_lblcr.c +1 -2
index a021e6aba3d7..a25cf7bb6185 100644
@@ -32,8 +32,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/module.h>
net/netfilter/ipvs/ip_vs_lc.c +1 -2
index c2764505e380..38cc38c5d8bb 100644
@@ -9,8 +9,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_mh.c +1 -2
index e3d7f5c879ce..f61f54004c9e 100644
@@ -17,8 +17,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_nfct.c +1 -2
index 08adcb222986..81974f69e5bb 100644
@@ -30,8 +30,7 @@
  * PASV response can not be NAT-ed) but Active FTP should work
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/types.h>
net/netfilter/ipvs/ip_vs_nq.c +1 -2
index ed7f5c889b41..ada158c610ce 100644
@@ -26,8 +26,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ovf.c +1 -2
index c7708b809700..c5c67df80a0b 100644
@@ -12,8 +12,7 @@
  * active connections
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_pe.c +1 -2
index 166c669f0763..3035079ebd99 100644
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/spinlock.h>
net/netfilter/ipvs/ip_vs_pe_sip.c +1 -2
index e4ce1d9a63f9..85f31d71e29a 100644
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_proto.c +1 -2
index a9fd1d3fc2cb..fd9dbca24c85 100644
@@ -8,8 +8,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_proto_ah_esp.c +1 -2
index 89602c16f6b6..44e14acc187e 100644
@@ -6,8 +6,7 @@
  *		Wensong Zhang <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/in.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_proto_tcp.c +1 -2
index 7da51390cea6..f68a1533ee45 100644
@@ -13,8 +13,7 @@
  *              protocol ip_vs_proto_data and is handled by netns
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_proto_udp.c +1 -2
index 68260d91c988..0f0107c80dd2 100644
@@ -9,8 +9,7 @@
  *              Network name space (netns) aware.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/in.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_rr.c +1 -2
index 6baa34dff9f0..4125ee561cdc 100644
@@ -14,8 +14,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_sched.c +1 -2
index d4903723be7e..c6e421c4e299 100644
@@ -12,8 +12,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/spinlock.h>
net/netfilter/ipvs/ip_vs_sed.c +1 -2
index a46f99a56618..245a323c84cd 100644
@@ -30,8 +30,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_sh.c +1 -2
index 92e77d7a6b50..0e85e07e23b9 100644
@@ -32,8 +32,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_sync.c +1 -2
index 5a0c6f42bd8f..54dd1514ac45 100644
@@ -32,8 +32,7 @@
  *					Persistence support, fwmark and time-out.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_twos.c +1 -2
index 8d5419edde50..dbb7f5fd4688 100644
@@ -4,8 +4,7 @@
  * Authors:     Darby Payne <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/module.h>
net/netfilter/ipvs/ip_vs_wlc.c +1 -2
index 9fa500927c0a..9da445ca09a1 100644
@@ -14,8 +14,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_wrr.c +1 -2
index 85ce0d04afac..99f09cbf2d9b 100644
@@ -13,8 +13,7 @@
  *                                    with weight 0 when all weights are zero
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_xmit.c +1 -2
index 95af252b2939..3162ce3c2640 100644
@@ -21,8 +21,7 @@
  * - the only place where we can see skb->sk != NULL
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
net/smc/af_smc.c +1 -2
index e388de8dca09..f97f77b041d9 100644
@@ -16,8 +16,7 @@
  *              based on prototype from Frank Blaschka
  */
 
-#define KMSG_COMPONENT "smc"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "smc: " fmt
 
 #include <linux/module.h>
 #include <linux/socket.h>
Signature · 1 line
2.51.0

Regards

--
Julian Anastasov <[email protected]>

maintainer Acked-by on v1 1/1
#6 lore raw
In reply to Heiko Carstens
Quoted 48 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 patch doesn't exist anymore.

The pattern of how the KMSG_COMPONENT macro is used can also be found at some non s390 specific code, for whatever reasons. Besides adding an indirection it is unused.

Remove the macro in order to get rid of a pointless indirection. Replace all users with the string it defines. In all cases this leads to a simple replacement like this:

- #define KMSG_COMPONENT "af_iucv"
- #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+ #define pr_fmt(fmt) "af_iucv: " fmt

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

---
 net/iucv/af_iucv.c                      | 3 +--
 net/iucv/iucv.c                         | 3 +--
 net/netfilter/ipvs/ip_vs_app.c          | 3 +--
 net/netfilter/ipvs/ip_vs_conn.c         | 3 +--
 net/netfilter/ipvs/ip_vs_core.c         | 3 +--
 net/netfilter/ipvs/ip_vs_ctl.c          | 3 +--
 net/netfilter/ipvs/ip_vs_dh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_est.c          | 3 +--
 net/netfilter/ipvs/ip_vs_fo.c           | 3 +--
 net/netfilter/ipvs/ip_vs_ftp.c          | 3 +--
 net/netfilter/ipvs/ip_vs_lblc.c         | 3 +--
 net/netfilter/ipvs/ip_vs_lblcr.c        | 3 +--
 net/netfilter/ipvs/ip_vs_lc.c           | 3 +--
 net/netfilter/ipvs/ip_vs_mh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_nfct.c         | 3 +--
 net/netfilter/ipvs/ip_vs_nq.c           | 3 +--
 net/netfilter/ipvs/ip_vs_ovf.c          | 3 +--
 net/netfilter/ipvs/ip_vs_pe.c           | 3 +--
 net/netfilter/ipvs/ip_vs_pe_sip.c       | 3 +--
 net/netfilter/ipvs/ip_vs_proto.c        | 3 +--
 net/netfilter/ipvs/ip_vs_proto_ah_esp.c | 3 +--
 net/netfilter/ipvs/ip_vs_proto_tcp.c    | 3 +--
 net/netfilter/ipvs/ip_vs_proto_udp.c    | 3 +--
 net/netfilter/ipvs/ip_vs_rr.c           | 3 +--
 net/netfilter/ipvs/ip_vs_sched.c        | 3 +--
Quoted 8 lines
 net/netfilter/ipvs/ip_vs_sed.c          | 3 +--
 net/netfilter/ipvs/ip_vs_sh.c           | 3 +--
 net/netfilter/ipvs/ip_vs_sync.c         | 3 +--
 net/netfilter/ipvs/ip_vs_twos.c         | 3 +--
 net/netfilter/ipvs/ip_vs_wlc.c          | 3 +--
 net/netfilter/ipvs/ip_vs_wrr.c          | 3 +--
 net/netfilter/ipvs/ip_vs_xmit.c         | 3 +--
 net/smc/af_smc.c                        | 3 +--

For net/smc

Quoted 460 lines
 33 files changed, 33 insertions(+), 66 deletions(-)
net/iucv/af_iucv.c +1 -2
index a4f1df92417d..1e62fbc22cb7 100644
@@ -10,8 +10,7 @@
  *		Ursula Braun <[email protected]>
  */
 
-#define KMSG_COMPONENT "af_iucv"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "af_iucv: " fmt
 
 #include <linux/filter.h>
 #include <linux/module.h>
net/iucv/iucv.c +1 -2
index 008be0abe3a5..da2af413c89d 100644
@@ -20,8 +20,7 @@
  *    CP Programming Service, IBM document # SC24-5760
  */
 
-#define KMSG_COMPONENT "iucv"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "iucv: " fmt
 
 #include <linux/kernel_stat.h>
 #include <linux/export.h>
net/netfilter/ipvs/ip_vs_app.c +1 -2
index fdacbc3c15be..d54d7da58334 100644
@@ -13,8 +13,7 @@
  * Author:	Juan Jose Ciarlante, <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_conn.c +1 -2
index 37ebb0cb62b8..50cc492c7553 100644
@@ -17,8 +17,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/interrupt.h>
 #include <linux/in.h>
net/netfilter/ipvs/ip_vs_core.c +1 -2
index 5ea7ab8bf4dc..90d56f92c0f6 100644
@@ -19,8 +19,7 @@
  *	Harald Welte			don't use nfcache
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ctl.c +1 -2
index 4c8fa22be88a..068702894377 100644
@@ -13,8 +13,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/init.h>
net/netfilter/ipvs/ip_vs_dh.c +1 -2
index 75f4c231f4a0..bb7aca4601ff 100644
@@ -30,8 +30,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_est.c +1 -2
index 93a925f1ed9b..77f4f637ff67 100644
@@ -12,8 +12,7 @@
  *              get_stats()) do the per cpu summing.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/jiffies.h>
net/netfilter/ipvs/ip_vs_fo.c +1 -2
index ab117e5bc34e..d657b47c6511 100644
@@ -8,8 +8,7 @@
  *     Kenny Mathis            :     added initial functionality based on weight
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ftp.c +1 -2
index 206c6700e200..b315c608fda4 100644
@@ -16,8 +16,7 @@
  * Author:	Wouter Gadeyne
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
net/netfilter/ipvs/ip_vs_lblc.c +1 -2
index 156181a3bacd..e6c8ed0c92f6 100644
@@ -34,8 +34,7 @@
  * me to write this module.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_lblcr.c +1 -2
index a021e6aba3d7..a25cf7bb6185 100644
@@ -32,8 +32,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/module.h>
net/netfilter/ipvs/ip_vs_lc.c +1 -2
index c2764505e380..38cc38c5d8bb 100644
@@ -9,8 +9,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_mh.c +1 -2
index e3d7f5c879ce..f61f54004c9e 100644
@@ -17,8 +17,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_nfct.c +1 -2
index 08adcb222986..81974f69e5bb 100644
@@ -30,8 +30,7 @@
  * PASV response can not be NAT-ed) but Active FTP should work
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/types.h>
net/netfilter/ipvs/ip_vs_nq.c +1 -2
index ed7f5c889b41..ada158c610ce 100644
@@ -26,8 +26,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_ovf.c +1 -2
index c7708b809700..c5c67df80a0b 100644
@@ -12,8 +12,7 @@
  * active connections
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_pe.c +1 -2
index 166c669f0763..3035079ebd99 100644
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/spinlock.h>
net/netfilter/ipvs/ip_vs_pe_sip.c +1 -2
index e4ce1d9a63f9..85f31d71e29a 100644
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_proto.c +1 -2
index a9fd1d3fc2cb..fd9dbca24c85 100644
@@ -8,8 +8,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_proto_ah_esp.c +1 -2
index 89602c16f6b6..44e14acc187e 100644
@@ -6,8 +6,7 @@
  *		Wensong Zhang <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/in.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_proto_tcp.c +1 -2
index 7da51390cea6..f68a1533ee45 100644
@@ -13,8 +13,7 @@
  *              protocol ip_vs_proto_data and is handled by netns
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_proto_udp.c +1 -2
index 68260d91c988..0f0107c80dd2 100644
@@ -9,8 +9,7 @@
  *              Network name space (netns) aware.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/in.h>
 #include <linux/ip.h>
net/netfilter/ipvs/ip_vs_rr.c +1 -2
index 6baa34dff9f0..4125ee561cdc 100644
@@ -14,8 +14,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_sched.c +1 -2
index d4903723be7e..c6e421c4e299 100644
@@ -12,8 +12,7 @@
  * Changes:
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/spinlock.h>
net/netfilter/ipvs/ip_vs_sed.c +1 -2
index a46f99a56618..245a323c84cd 100644
@@ -30,8 +30,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_sh.c +1 -2
index 92e77d7a6b50..0e85e07e23b9 100644
@@ -32,8 +32,7 @@
  *
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/ip.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_sync.c +1 -2
index 5a0c6f42bd8f..54dd1514ac45 100644
@@ -32,8 +32,7 @@
  *					Persistence support, fwmark and time-out.
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/slab.h>
net/netfilter/ipvs/ip_vs_twos.c +1 -2
index 8d5419edde50..dbb7f5fd4688 100644
@@ -4,8 +4,7 @@
  * Authors:     Darby Payne <[email protected]>
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/module.h>
net/netfilter/ipvs/ip_vs_wlc.c +1 -2
index 9fa500927c0a..9da445ca09a1 100644
@@ -14,8 +14,7 @@
  *     Wensong Zhang            :     added any dest with weight=0 is quiesced
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_wrr.c +1 -2
index 85ce0d04afac..99f09cbf2d9b 100644
@@ -13,8 +13,7 @@
  *                                    with weight 0 when all weights are zero
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
net/netfilter/ipvs/ip_vs_xmit.c +1 -2
index 95af252b2939..3162ce3c2640 100644
@@ -21,8 +21,7 @@
  * - the only place where we can see skb->sk != NULL
  */
 
-#define KMSG_COMPONENT "IPVS"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "IPVS: " fmt
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
net/smc/af_smc.c +1 -2
index e388de8dca09..f97f77b041d9 100644
@@ -16,8 +16,7 @@
  *              based on prototype from Frank Blaschka
  */
 
-#define KMSG_COMPONENT "smc"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#define pr_fmt(fmt) "smc: " fmt
 
 #include <linux/module.h>
 #include <linux/socket.h>
#7 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:07:05 +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 patch doesn't exist anymore.

[...]

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

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

You are awesome, thank you!

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