Re: [PATCH 3/6] ata: libata-core: use pr_warn() instead of printk(KERN_WARNING)

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

 



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@xxxxxx>

---
  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@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