[PATCH 6/6] ata: pata_optidma: use dev_warn() instead of printk(KERN_WARNING)

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

 



The OPTi PCI device driver still calls printk(KERN_WARNING, ...) in
optiplus_with_udma() -- convert it to calling pr_warn()...

This helpfully fixes the following complaints from scripts/checkpatch.pl:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
dev_warn(dev, ... then pr_info(...  to printk(KERN_WARNING ...

Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

---
 drivers/ata/pata_optidma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index dfc36b4ec9c6..23e2326ce31e 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -390,7 +390,7 @@ static int optiplus_with_udma(struct pci_dev *pdev)
 	if (r & 0x80)	/* IDEDIR disabled */
 		ret = 1;
 done:
-	printk(KERN_WARNING "UDMA not supported in this configuration.\n");
+	dev_warn(&pdev->dev, "UDMA not supported in this configuration.\n");
 done_nomsg:		/* Wrong chip revision */
 	pci_dev_put(dev1);
 	return ret;
-- 
2.47.0





[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux