Skip to contentSkip to conversation

usb: renesas-xhci: Use pr_info while fw verify success

PATCH In review Chen Xingdi 2 participants 4 messages Jul 26, 2022 – Jul 27, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: renesas-xhci: Use pr_info while fw verify success

While fw verify success, it is confused to print an error log which is actually not an error, so use pr_info to print firmware version instead of pr_err.

---
 drivers/usb/host/xhci-pci-renesas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-pci-renesas.c +1 -1
index 52599d96634f..1eb1d863d545 100644
@@ -151,7 +151,7 @@ static int renesas_fw_verify(const void *fw_data,
 	}
 
 	fw_version = get_unaligned_le16(fw_data + fw_version_pointer);
-	pr_err("got firmware version: %02x.", fw_version);
+	pr_info("got firmware version: %02x.", fw_version);
 
 	return 0;
 }
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 14 lines · Chen Xingdi

While fw verify success, it is confused to print an error log which is actually not an error, so use pr_info to print firmware version instead of pr_err.

---
 drivers/usb/host/xhci-pci-renesas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-pci-renesas.c +0 -0
index 52599d96634f..1eb1d863d545 100644

drivers/usb/host/xhci-pci-renesas.c static int renesas_fw_verify(const void *fw_data, · line 154

Quoted 5 lines
drivers/usb/host/xhci-pci-renesas.c +1 -1
@@ -151,7 +151,7 @@ static int renesas_fw_verify(const void *fw_data,
 	}
 
 	fw_version = get_unaligned_le16(fw_data + fw_version_pointer);
-	pr_err("got firmware version: %02x.", fw_version);
+	pr_info("got firmware version: %02x.", fw_version);

Why print anything at all? When drivers are working properly, they should be quiet. Who relies on this message being sent to the kernel log?

thanks,

greg k-h

author
#2 lore raw

Thanks for your advice, I will delete the log and send a new patch.

-----邮件原件-----
发件人: Greg KH <[email protected]>
发送时间: 2022年7月27日 0:52
收件人: chenxingdi <[email protected]>
抄送: [email protected]; [email protected]; [email protected]; [email protected] 主题: Re: [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success

Quoted 15 lines · Chen Xingdi

While fw verify success, it is confused to print an error log which is actually not an error, so use pr_info to print firmware version instead of pr_err.

---
 drivers/usb/host/xhci-pci-renesas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-pci-renesas.c +0 -0
index 52599d96634f..1eb1d863d545 100644

drivers/usb/host/xhci-pci-renesas.c static int renesas_fw_verify(const void *fw_data, · line 154

Quoted 5 lines
drivers/usb/host/xhci-pci-renesas.c +1 -1
@@ -151,7 +151,7 @@ static int renesas_fw_verify(const void *fw_data,
 	}
 
 	fw_version = get_unaligned_le16(fw_data + fw_version_pointer);
-	pr_err("got firmware version: %02x.", fw_version);
+	pr_info("got firmware version: %02x.", fw_version);

Why print anything at all? When drivers are working properly, they should be quiet. Who relies on this message being sent to the kernel log?

thanks,

greg k-h

#3 lore raw

PATCH v2 1/1 usb: renesas-xhci: Do not print any log while fw verif success

In reply to Chen Xingdi

When drivers are working properly, they should be quiet.

---
v2:
- delete the log instead of change the log level to info.

 drivers/usb/host/xhci-pci-renesas.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/usb/host/xhci-pci-renesas.c +0 -4
index 52599d96634f..93f8b355bc70 100644
@@ -120,7 +120,6 @@ static int renesas_fw_verify(const void *fw_data,
 			     size_t length)
 {
 	u16 fw_version_pointer;
-	u16 fw_version;
 
 	/*
 	 * The Firmware's Data Format is describe in
@@ -150,9 +149,6 @@ static int renesas_fw_verify(const void *fw_data,
 		return -EINVAL;
 	}
 
-	fw_version = get_unaligned_le16(fw_data + fw_version_pointer);
-	pr_err("got firmware version: %02x.", fw_version);
-
 	return 0;
 }
 
Signature · 1 line
2.17.1