Message ID | 98cac57e-de28-48f2-99a8-a6d1afae1610@omp.ru |
---|---|
State | New |
Headers | show |
Series | libata: get rid of (almost) all printk() calls | expand |
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@gmail.com> > > --- > 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@suse.de> Cheers, Hannes
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); } }
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@gmail.com> --- drivers/ata/ahci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)