Skip to content

Commit c940be4

Browse files
hcahcakuba-moo
authored andcommitted
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/ 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>
1 parent ed01d20 commit c940be4

33 files changed

Lines changed: 33 additions & 66 deletions

net/iucv/af_iucv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
* Ursula Braun <ursula.braun@de.ibm.com>
1111
*/
1212

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

1615
#include <linux/filter.h>
1716
#include <linux/module.h>

net/iucv/iucv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
* CP Programming Service, IBM document # SC24-5760
2121
*/
2222

23-
#define KMSG_COMPONENT "iucv"
24-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
23+
#define pr_fmt(fmt) "iucv: " fmt
2524

2625
#include <linux/kernel_stat.h>
2726
#include <linux/export.h>

net/netfilter/ipvs/ip_vs_app.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
* Author: Juan Jose Ciarlante, <jjciarla@raiz.uncu.edu.ar>
1414
*/
1515

16-
#define KMSG_COMPONENT "IPVS"
17-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
16+
#define pr_fmt(fmt) "IPVS: " fmt
1817

1918
#include <linux/module.h>
2019
#include <linux/kernel.h>

net/netfilter/ipvs/ip_vs_conn.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
* Changes:
1818
*/
1919

20-
#define KMSG_COMPONENT "IPVS"
21-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
20+
#define pr_fmt(fmt) "IPVS: " fmt
2221

2322
#include <linux/interrupt.h>
2423
#include <linux/in.h>

net/netfilter/ipvs/ip_vs_core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
* Harald Welte don't use nfcache
2020
*/
2121

22-
#define KMSG_COMPONENT "IPVS"
23-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
22+
#define pr_fmt(fmt) "IPVS: " fmt
2423

2524
#include <linux/module.h>
2625
#include <linux/kernel.h>

net/netfilter/ipvs/ip_vs_ctl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
* Changes:
1414
*/
1515

16-
#define KMSG_COMPONENT "IPVS"
17-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
16+
#define pr_fmt(fmt) "IPVS: " fmt
1817

1918
#include <linux/module.h>
2019
#include <linux/init.h>

net/netfilter/ipvs/ip_vs_dh.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
*
3131
*/
3232

33-
#define KMSG_COMPONENT "IPVS"
34-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
33+
#define pr_fmt(fmt) "IPVS: " fmt
3534

3635
#include <linux/ip.h>
3736
#include <linux/slab.h>

net/netfilter/ipvs/ip_vs_est.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
* get_stats()) do the per cpu summing.
1313
*/
1414

15-
#define KMSG_COMPONENT "IPVS"
16-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
15+
#define pr_fmt(fmt) "IPVS: " fmt
1716

1817
#include <linux/kernel.h>
1918
#include <linux/jiffies.h>

net/netfilter/ipvs/ip_vs_fo.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
* Kenny Mathis : added initial functionality based on weight
99
*/
1010

11-
#define KMSG_COMPONENT "IPVS"
12-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
11+
#define pr_fmt(fmt) "IPVS: " fmt
1312

1413
#include <linux/module.h>
1514
#include <linux/kernel.h>

net/netfilter/ipvs/ip_vs_ftp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
* Author: Wouter Gadeyne
1717
*/
1818

19-
#define KMSG_COMPONENT "IPVS"
20-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
19+
#define pr_fmt(fmt) "IPVS: " fmt
2120

2221
#include <linux/module.h>
2322
#include <linux/moduleparam.h>

0 commit comments

Comments
 (0)