Re: [PATCH 1/4] bfa: Remove legacy printk() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/27/20 1:57 AM, Martin K. Petersen wrote:

Hi Hannes,

Replace the remaining callsites to use dev_printk() and friends.
@@ -336,9 +328,7 @@ bfad_debugfs_write_regwr(struct file *file, const char __user *buf,
  	/* offset and len sanity check */
  	rc = bfad_reg_offset_check(bfa, addr, 1);
  	if (rc) {
-		printk(KERN_INFO
-			"bfad[%d]: Failed reg offset check\n",
-			bfad->inst_no);
+		BFA_MSG(KERN_INFO, bfad, "Failed reg offset check\n");
  		return -EINVAL;
  	}
diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h
index eaee7c8bc2d2..619a7e47553b 100644
--- a/drivers/scsi/bfa/bfad_drv.h
+++ b/drivers/scsi/bfa/bfad_drv.h
@@ -286,6 +286,9 @@ do {									\
  		dev_printk(level, &((bfad)->pcidev)->dev, fmt, ##arg);	\
  } while (0)
+#define BFA_MSG(level, bfad, fmt, arg...) \
+	dev_warn(&((bfad)->pcidev)->dev, "bfad%d: " fmt, (bfad)->inst_no, ##arg);
+

Looks like all the KERN_{INFO,ALERT,ERR} messages get turned into
KERN_WARNING with this change. 'level' doesn't appear to be used
anywhere. Am I missing something?

Ouch, indeed. I'll fix it up.

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux