Re: [PATCH 4/6] ata: pata_cs5530: use pr_*() instead of printk(KERN_*)

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

 



On 11/8/24 21:21, Sergey Shtylyov wrote:
The CS5530 PCI device driver still calls printk(KERN_INFO, ...) in
cs5530_is_palmax() and printk(KERN_ERR, ...) in cs5530_init_chip() --
convert them to calling pr_info() and pr_err() respectively...

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

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

WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

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

---
  drivers/ata/pata_cs5530.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index 1e67b0f8db43..4ff98c4722e9 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -177,7 +177,7 @@ static const struct dmi_system_id palmax_dmi_table[] = {
  static int cs5530_is_palmax(void)
  {
  	if (dmi_check_system(palmax_dmi_table)) {
-		printk(KERN_INFO "Palmax PD1100: Disabling DMA on docking port.\n");
+		pr_info("Palmax PD1100: Disabling DMA on docking port.\n");
  		return 1;
  	}
  	return 0;
@@ -206,11 +206,11 @@ static int cs5530_init_chip(void)
  		}
  	}
  	if (!master_0) {
-		printk(KERN_ERR DRV_NAME ": unable to locate PCI MASTER function\n");
+		pr_err(DRV_NAME ": unable to locate PCI MASTER function\n");
  		goto fail_put;
  	}
  	if (!cs5530_0) {
-		printk(KERN_ERR DRV_NAME ": unable to locate CS5530 LEGACY function\n");
+		pr_err(DRV_NAME ": unable to locate CS5530 LEGACY function\n");
  		goto fail_put;
  	}
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@xxxxxxx                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich




[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