Commit d188e5db authored by John Garry's avatar John Garry Committed by Martin K. Petersen
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1399846d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ static int sas_ata_printk(const char *level, const struct domain_device *ddev,
	vaf.fmt = fmt;
	vaf.va = &args;

	r = printk("%ssas: ata%u: %s: %pV",
	r = printk("%s" SAS_FMT "ata%u: %s: %pV",
		   level, ap->print_id, dev_name(dev), &vaf);

	va_end(args);
+11 −2
Original line number Diff line number Diff line
@@ -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)
+3 −0
Original line number Diff line number Diff line

#include "sas_internal.h"

#include <linux/kernel.h>
#include <linux/export.h>
#include <scsi/sas.h>