diff mbox series

net/packet: clarify source of pr_*() messages

Message ID 3ca9c4b3d77fb729f6741cb00d461da3bc6b2096.1631209787.git.baruch@tkos.co.il
State New
Headers show
Series net/packet: clarify source of pr_*() messages | expand

Commit Message

Baruch Siach Sept. 9, 2021, 5:49 p.m. UTC
Add pr_fmt macro to spell out the source of messages in prefix.

Before this patch:

  packet size is too long (1543 > 1518)

With this patch:

  af_packet: packet size is too long (1543 > 1518)

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 net/packet/af_packet.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 543365f58e97..2a2bc64f75cf 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -46,6 +46,8 @@ 
  *					Copyright (C) 2011, <lokec@ccs.neu.edu>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/ethtool.h>
 #include <linux/types.h>
 #include <linux/mm.h>