usb: renesas-xhci: Use pr_info while fw verify success
Subsystems (2)
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
@@ -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
Greg KH
maintainerQuoted 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_infoto print firmware version instead ofpr_err.Signed-off-by Chen Xingdi <[email protected]>--- drivers/usb/host/xhci-pci-renesas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/host/xhci-pci-renesas.c +0
-0
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
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_infoto print firmware version instead ofpr_err.Signed-off-by Chen Xingdi <[email protected]>--- drivers/usb/host/xhci-pci-renesas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/host/xhci-pci-renesas.c +0
-0
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
PATCH v2 1/1 usb: renesas-xhci: Do not print any log while fw verif success
In reply to Chen XingdiWhen 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
@@ -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