OSDN Git Service

scsi: mpt3sas: Add ioc_<level> logging macros
authorJoe Perches <joe@perches.com>
Mon, 17 Sep 2018 15:01:08 +0000 (08:01 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 11 Oct 2018 02:00:43 +0000 (22:00 -0400)
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>
drivers/scsi/mpt3sas/mpt3sas_base.h

index 96dc15e..941a4fa 100644 (file)
@@ -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
  */