Message ID | 0d4048ed-8256-4c5f-9b6d-7e68786fa7cd@omp.ru |
---|---|
State | New |
Headers | show |
Series | libata: get rid of (almost) all printk() calls | expand |
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@omp.ru> > > --- > 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@suse.de> Cheers, Hannes
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; }
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@omp.ru> --- drivers/ata/pata_cs5530.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)