Message ID | 813b22ec-a16d-4598-8c61-6522ced1116e@omp.ru |
---|---|
State | New |
Headers | show |
Series | libata: get rid of (almost) all printk() calls | expand |
On 11/8/24 21:20, Sergey Shtylyov wrote: > ata_parse_force_param() still calls printk(KERN_WARNING, ...) -- convert > it to calling pr_warn(), also joining the broken up message strings... > > This helpfully fixes the following complaints from scripts/checkpatch.pl: > > WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then > dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... > > WARNING: quoted string split across lines > > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> > > --- > drivers/ata/libata-core.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c > index cdb20a700b55..47f652981043 100644 > --- a/drivers/ata/libata-core.c > +++ b/drivers/ata/libata-core.c > @@ -6443,8 +6443,7 @@ static void __init ata_parse_force_param(void) > > ata_force_tbl = kcalloc(size, sizeof(ata_force_tbl[0]), GFP_KERNEL); > if (!ata_force_tbl) { > - printk(KERN_WARNING "ata: failed to extend force table, " > - "libata.force ignored\n"); > + pr_warn("ata: failed to extend force table, libata.force ignored\n"); > return; > } > > @@ -6455,9 +6454,8 @@ static void __init ata_parse_force_param(void) > > next = cur; > if (ata_parse_force_one(&next, &te, &reason)) { > - printk(KERN_WARNING "ata: failed to parse force " > - "parameter \"%s\" (%s)\n", > - cur, reason); > + pr_warn("ata: failed to parse force parameter \"%s\" (%s)\n", > + cur, reason); > continue; > } > Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index cdb20a700b55..47f652981043 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6443,8 +6443,7 @@ static void __init ata_parse_force_param(void) ata_force_tbl = kcalloc(size, sizeof(ata_force_tbl[0]), GFP_KERNEL); if (!ata_force_tbl) { - printk(KERN_WARNING "ata: failed to extend force table, " - "libata.force ignored\n"); + pr_warn("ata: failed to extend force table, libata.force ignored\n"); return; } @@ -6455,9 +6454,8 @@ static void __init ata_parse_force_param(void) next = cur; if (ata_parse_force_one(&next, &te, &reason)) { - printk(KERN_WARNING "ata: failed to parse force " - "parameter \"%s\" (%s)\n", - cur, reason); + pr_warn("ata: failed to parse force parameter \"%s\" (%s)\n", + cur, reason); continue; }
ata_parse_force_param() still calls printk(KERN_WARNING, ...) -- convert it to calling pr_warn(), also joining the broken up message strings... This helpfully fixes the following complaints from scripts/checkpatch.pl: WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... WARNING: quoted string split across lines Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- drivers/ata/libata-core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)