Re: [PATCH 2/6] ata: ahci: use dev_info() instead of printk(KERN_INFO)

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

 



On 11/8/24 21:17, Sergey Shtylyov wrote:
The AHCI PCI device driver still calls printk(KERN_INFO, ...) in
ahci_mcp89_apple_enable() and ahci_init_msi() -- convert them to
calling dev_info(), somewhat rewording the messages themselves...

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

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

Signed-off-by: Sergey Shtylyov <sergei.shtylyov@xxxxxxxxx>

---
  drivers/ata/ahci.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2d3d3d67b4d9..32c79b41ddea 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1141,7 +1141,7 @@ static void ahci_mcp89_apple_enable(struct pci_dev *pdev)
  {
  	u32 val;
- printk(KERN_INFO "ahci: enabling MCP89 AHCI mode\n");
+	dev_info(&pdev->dev, "enabling MCP89 AHCI mode\n");
pci_read_config_dword(pdev, 0xf8, &val);
  	val |= 1 << 0x1b;
@@ -1692,8 +1692,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
  			 * Fallback to single MSI mode if the controller
  			 * enforced MRSM mode.
  			 */
-			printk(KERN_INFO
-				"ahci: MRSM is on, fallback to single MSI\n");
+			dev_info(&pdev->dev, "AHCI MRSM is on, fallback to single MSI\n");
  			pci_free_irq_vectors(pdev);
  		}
  	}

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