summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2018-09-17 08:01:08 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-05 09:00:30 +0200
commit229e75730c784f7b871ae9bd76f8bd506d20a304 (patch)
treed92573839efac76045f659e96889910b9b60c1d3
parent9eaaefbae8f5ddbed0fce822042ad969f5f876c5 (diff)
downloadlinux-stable-229e75730c784f7b871ae9bd76f8bd506d20a304.tar.gz
linux-stable-229e75730c784f7b871ae9bd76f8bd506d20a304.tar.bz2
linux-stable-229e75730c784f7b871ae9bd76f8bd506d20a304.zip
scsi: mpt3sas: Add ioc_<level> logging macros
[ Upstream commit 645a20c6821cd1ab58af8a1f99659e619c216efd ] These macros can help identify specific logging uses and eventually perhaps reduce object sizes. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Stable-dep-of: 4254dfeda82f ("scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory") Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 96dc15e90bd8..941a4faf20be 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -160,6 +160,15 @@ struct mpt3sas_nvme_cmd {
*/
#define MPT3SAS_FMT "%s: "
+#define ioc_err(ioc, fmt, ...) \
+ pr_err("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
+#define ioc_notice(ioc, fmt, ...) \
+ pr_notice("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
+#define ioc_warn(ioc, fmt, ...) \
+ pr_warn("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
+#define ioc_info(ioc, fmt, ...) \
+ pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
+
/*
* WarpDrive Specific Log codes
*/