]> Gentwo Git Trees - linux/.git/commitdiff
net: Remove KMSG_COMPONENT macro
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 26 Nov 2025 14:07:05 +0000 (15:07 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 29 Nov 2025 03:20:27 +0000 (19:20 -0800)
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/

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Alexandra Winter <wintera@linux.ibm.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Sidraya Jayagond <sidraya@linux.ibm.com>
Link: https://patch.msgid.link/20251126140705.1944278-1-hca@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
33 files changed:
net/iucv/af_iucv.c
net/iucv/iucv.c
net/netfilter/ipvs/ip_vs_app.c
net/netfilter/ipvs/ip_vs_conn.c
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_dh.c
net/netfilter/ipvs/ip_vs_est.c
net/netfilter/ipvs/ip_vs_fo.c
net/netfilter/ipvs/ip_vs_ftp.c
net/netfilter/ipvs/ip_vs_lblc.c
net/netfilter/ipvs/ip_vs_lblcr.c
net/netfilter/ipvs/ip_vs_lc.c
net/netfilter/ipvs/ip_vs_mh.c
net/netfilter/ipvs/ip_vs_nfct.c
net/netfilter/ipvs/ip_vs_nq.c
net/netfilter/ipvs/ip_vs_ovf.c
net/netfilter/ipvs/ip_vs_pe.c
net/netfilter/ipvs/ip_vs_pe_sip.c
net/netfilter/ipvs/ip_vs_proto.c
net/netfilter/ipvs/ip_vs_proto_ah_esp.c
net/netfilter/ipvs/ip_vs_proto_tcp.c
net/netfilter/ipvs/ip_vs_proto_udp.c
net/netfilter/ipvs/ip_vs_rr.c
net/netfilter/ipvs/ip_vs_sched.c
net/netfilter/ipvs/ip_vs_sed.c
net/netfilter/ipvs/ip_vs_sh.c
net/netfilter/ipvs/ip_vs_sync.c
net/netfilter/ipvs/ip_vs_twos.c
net/netfilter/ipvs/ip_vs_wlc.c
net/netfilter/ipvs/ip_vs_wrr.c
net/netfilter/ipvs/ip_vs_xmit.c
net/smc/af_smc.c

index a4f1df92417d9fb241da1dcdae9a804a5332d521..1e62fbc22cb7b82256e8fa8d36a458fac214ca9f 100644 (file)
@@ -10,8 +10,7 @@
  *             Ursula Braun <ursula.braun@de.ibm.com>
  */
 
-#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>
index 008be0abe3a57861b36ee464bf396ba6619b87fa..da2af413c89dc5f09b886229c6c72427cecb40f8 100644 (file)
@@ -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>
index fdacbc3c15bef972cbc8237add6567d3123d3354..d54d7da583346b81c71aeb380d13b57f85c8b384 100644 (file)
@@ -13,8 +13,7 @@
  * Author:     Juan Jose Ciarlante, <jjciarla@raiz.uncu.edu.ar>
  */
 
-#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>
index 37ebb0cb62b8b6d3a6a5a8e43e6fda592eac3948..50cc492c7553e2f21f65929034d861c165bf1f28 100644 (file)
@@ -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>
index 5ea7ab8bf4dcc2e9e7f96c6d8b1952a286aa4598..90d56f92c0f68f5dc573884092b407823c788c24 100644 (file)
@@ -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>
index 4c8fa22be88ade9f621454ea7e9e775480d4f26b..06870289437748240e0eeaaa20ddc0452f5f857e 100644 (file)
@@ -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>
index 75f4c231f4a0277b00bb3324559d51ea9222959b..bb7aca4601ffcf552ab43e790d355adfc9b8cbab 100644 (file)
@@ -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>
index 93a925f1ed9b8199a46244d69ee7b3893731e008..77f4f637ff679ee391162cd2b8593c351a472b32 100644 (file)
@@ -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>
index ab117e5bc34ead2a9bae1cdd6660ebb9d318aa29..d657b47c6511ffc5681d54d0b755e8da2258fae7 100644 (file)
@@ -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>
index 206c6700e2006edf3b814cbe22fb8fe8f5f2bcf1..b315c608fda43ed5d39401338ff9816fef28f0dd 100644 (file)
@@ -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>
index 156181a3bacd7d6c8fa63d75112f3ddc2d14fb32..e6c8ed0c92f61efaa8cfb4a3e047155e1ac9c79b 100644 (file)
@@ -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>
index a021e6aba3d7b628603aa76232153af0c8fb8a0e..a25cf7bb6185b3f5e90489a24d8d554062550777 100644 (file)
@@ -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>
index c2764505e380f57093370855671a44aab70c9ffb..38cc38c5d8bbd93aa131b22a7a9034159aa06734 100644 (file)
@@ -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>
index e3d7f5c879cebf3c77ba88881f9c34f83e138f67..f61f54004c9ea8ac712e215d83bb23981cba552e 100644 (file)
@@ -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>
index 08adcb22298622be0dadfc056d86b3b1a378aaf5..81974f69e5bb4e658861c980516cc69c31d63cb1 100644 (file)
@@ -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>
index ed7f5c889b417b02dcf33b6aa0ff1081b940ec64..ada158c610ce11032c7605126d261d0864663dc0 100644 (file)
@@ -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>
index c7708b809700de1a41bb5b3a9a79aad6643165aa..c5c67df80a0b3c38e79c131f97b7d0d8858559a7 100644 (file)
@@ -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>
index 166c669f07634b2652e8ed71938415de20b9a14f..3035079ebd997247779212176789df8aa2fafc8f 100644 (file)
@@ -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>
index e4ce1d9a63f913e20956be3b96e146f86ec3c3aa..85f31d71e29a3a0833735992c0cae476e25effb5 100644 (file)
@@ -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>
index a9fd1d3fc2cbfe1b2c00b0e62d0bba97ae85d919..fd9dbca24c8512816d1f509b04d66780219d37d4 100644 (file)
@@ -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>
index 89602c16f6b629c25566eed546e7d9f9ae2eb8e2..44e14acc187ee3b924e4e3f9e8589b67a91531f0 100644 (file)
@@ -6,8 +6,7 @@
  *             Wensong Zhang <wensong@linuxvirtualserver.org>
  */
 
-#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>
index 7da51390cea6b8c5ebd9d474823c1b9126432324..f68a1533ee455eb0261b53628cb467cdf1c420af 100644 (file)
@@ -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>
index 68260d91c98870e74ccae77db3b0f496e3d194d2..0f0107c80dd235700cd763fbf2f522a8e5859fab 100644 (file)
@@ -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>
index 6baa34dff9f045ec25c441ed5c236bbed0e908ae..4125ee561cdc368ca96406e1b567409347c585be 100644 (file)
@@ -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>
index d4903723be7e90ad6c996f00ee66486acd6302fb..c6e421c4e2991363769085555d3e9b0a05ade5d4 100644 (file)
@@ -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>
index a46f99a5661848dc1103db68c494d22595428f26..245a323c84cd329cd4bccc3b4e9af3283849ee14 100644 (file)
@@ -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>
index 92e77d7a6b50efe8cded589066c061b4a75d5eef..0e85e07e23b95d3e2266968fdd996f4632aaaf2d 100644 (file)
@@ -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>
index 5a0c6f42bd8f23632d13a3b6968ec9d58d22a4ae..54dd1514ac457aaa030bcc3ec9daee13aaddeff5 100644 (file)
@@ -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>
index 8d5419edde50720949b7ad01cda527a72399413e..dbb7f5fd4688a40687acd788b1de204d1ef9ec82 100644 (file)
@@ -4,8 +4,7 @@
  * Authors:     Darby Payne <darby.payne@applovin.com>
  */
 
-#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>
index 9fa500927c0a07bb92d53cbdaaf6bbd063c6a9a6..9da445ca09a14ce847f5b1a0bfcd21f00148912b 100644 (file)
@@ -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>
index 85ce0d04afac419730b6fed9e8bd30745baee8e9..99f09cbf2d9bbcc661e32980eda224db3d24a98a 100644 (file)
@@ -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>
index 95af252b29397dd24a5c6cb72944920f2a639a5b..3162ce3c26404f0b20c1e240adac9a8248bd1a6b 100644 (file)
@@ -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>
index e388de8dca09701325b74fa25373dcefef9e6df8..f97f77b041d974b319ff919a94cbbbffedecd179 100644 (file)
@@ -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>