Commit c940be4c authored by Heiko Carstens's avatar Heiko Carstens Committed by Jakub Kicinski
Browse files

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: default avatarHeiko Carstens <hca@linux.ibm.com>
Acked-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
Acked-by: default avatarSidraya Jayagond <sidraya@linux.ibm.com>
Link: https://patch.msgid.link/20251126140705.1944278-1-hca@linux.ibm.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ed01d206
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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>
+1 −2
Original line number Diff line number Diff line
@@ -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>
+1 −2
Original line number Diff line number Diff line
@@ -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>
+1 −2
Original line number Diff line number Diff line
@@ -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>
+1 −2
Original line number Diff line number Diff line
@@ -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>
Loading