Message ID | 0a19e2e7-b33c-4fb2-9183-33855337097d@omp.ru |
---|---|
State | New |
Headers | show |
Series | libata: get rid of (almost) all printk() calls | expand |
On 11/8/24 21:26, Sergey Shtylyov wrote: > 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@omp.ru> > > --- > 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; Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes
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;
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@omp.ru> --- drivers/ata/pata_optidma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)