summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_internal.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2018-11-15 18:20:29 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-15 14:37:05 -0500
commitd188e5db9d274db4c183861438f883c1d74b0f16 (patch)
tree06b8a272f83473a3b1d15393cd186537d12cc7e7 /drivers/scsi/libsas/sas_internal.h
parent1399846d4b99cbb945362c9867709fe7613d30fd (diff)
downloadlinux-d188e5db9d274db4c183861438f883c1d74b0f16.tar.bz2
scsi: libsas: Use pr_fmt(fmt)
In preparation for dropping the libsas printk wrappers, use pr_fmt(fmt) declaration to add the framework log prefix - "sas". Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_internal.h')
-rw-r--r--drivers/scsi/libsas/sas_internal.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index 50e12d662ffe..94ebf4183717 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -32,9 +32,18 @@
#include <scsi/libsas.h>
#include <scsi/sas_ata.h>
-#define sas_printk(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__)
+#ifdef pr_fmt
+#undef pr_fmt
+#endif
+
+#define SAS_FMT "sas: "
+
+#define pr_fmt(fmt) SAS_FMT fmt
+
+#define sas_printk(fmt, ...) printk(KERN_NOTICE fmt, ## __VA_ARGS__)
+
+#define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG fmt, ## __VA_ARGS__)
-#define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG "sas: " fmt, ## __VA_ARGS__)
#define TO_SAS_TASK(_scsi_cmd) ((void *)(_scsi_cmd)->host_scribble)
#define ASSIGN_SAS_TASK(_sc, _t) do { (_sc)->host_scribble = (void *) _t; } while (0)