summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt3sas/mpt3sas_base.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2018-09-17 18:01:08 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-10-11 05:00:43 +0300
commit645a20c6821cd1ab58af8a1f99659e619c216efd (patch)
treec458f50d7ecb6d74b94718298aab6cbdce9f11ae /drivers/scsi/mpt3sas/mpt3sas_base.h
parent3bf31de7120670c96e87d8fa909efbf3734c1ae5 (diff)
downloadlinux-645a20c6821cd1ab58af8a1f99659e619c216efd.tar.xz
scsi: mpt3sas: Add ioc_<level> logging macros
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>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_base.h')
-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
*/