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>
This commit is contained in:
John Garry
2018-11-15 18:20:29 +08:00
committed by Martin K. Petersen
parent 1399846d4b
commit d188e5db9d
3 changed files with 15 additions and 3 deletions

View File

@@ -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)