* [PATCH] scsi: mvsas: Don't emit __LINE__ in debug messages
@ 2026-04-27 17:45 Uwe Kleine-König (The Capable Hub)
2026-05-15 2:05 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-04-27 17:45 UTC (permalink / raw)
To: James E.J. Bottomley; +Cc: Martin K. Petersen, linux-scsi
__LINE__ changes quite easily for cleanup commits. So when checking if a
cleanup patch introduces changes to the resulting binary each usage of
__LINE__ is source of annoyance.
So instead of __FILE__ and __LINE__ emit __func__ to give at least some
more indication about where the messages originates from than __FILE__
alone; with that and the actual message the situation should be clear
enough.
While at it reduce duplication by implementing mv_dprintk() using
mv_printk().
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/scsi/mvsas/mv_sas.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h
index 09ce3f2241f2..7521f969aa87 100644
--- a/drivers/scsi/mvsas/mv_sas.h
+++ b/drivers/scsi/mvsas/mv_sas.h
@@ -35,10 +35,10 @@
#define MVS_ID_NOT_MAPPED 0x7f
#define WIDE_PORT_MAX_PHY 4
#define mv_printk(fmt, arg ...) \
- printk(KERN_DEBUG"%s %d:" fmt, __FILE__, __LINE__, ## arg)
+ printk(KERN_DEBUG "%s: " fmt, __func__, ## arg)
#ifdef MV_DEBUG
-#define mv_dprintk(format, arg...) \
- printk(KERN_DEBUG"%s %d:" format, __FILE__, __LINE__, ## arg)
+#define mv_dprintk(fmt, arg...) \
+ mv_printk(fmt, ## arg)
#else
#define mv_dprintk(format, arg...) no_printk(format, ## arg)
#endif
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: mvsas: Don't emit __LINE__ in debug messages
2026-04-27 17:45 [PATCH] scsi: mvsas: Don't emit __LINE__ in debug messages Uwe Kleine-König (The Capable Hub)
@ 2026-05-15 2:05 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2026-05-15 2:05 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi
Uwe,
> __LINE__ changes quite easily for cleanup commits. So when checking if a
> cleanup patch introduces changes to the resulting binary each usage of
> __LINE__ is source of annoyance.
Applied to 7.2/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-15 2:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 17:45 [PATCH] scsi: mvsas: Don't emit __LINE__ in debug messages Uwe Kleine-König (The Capable Hub)
2026-05-15 2:05 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.