drivers/usb/host/xhci-pci-renesas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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.
Signed-off-by: Chen Xingdi <chenxingdi@huawei.com>
---
drivers/usb/host/xhci-pci-renesas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-pci-renesas.c b/drivers/usb/host/xhci-pci-renesas.c
index 52599d96634f..1eb1d863d545 100644
--- a/drivers/usb/host/xhci-pci-renesas.c
+++ b/drivers/usb/host/xhci-pci-renesas.c
@@ -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;
}
--
2.17.1
On Tue, Jul 26, 2022 at 02:05:09PM +0800, Chen Xingdi wrote:
> 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.
>
> Signed-off-by: Chen Xingdi <chenxingdi@huawei.com>
> ---
> drivers/usb/host/xhci-pci-renesas.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci-pci-renesas.c b/drivers/usb/host/xhci-pci-renesas.c
> index 52599d96634f..1eb1d863d545 100644
> --- a/drivers/usb/host/xhci-pci-renesas.c
> +++ b/drivers/usb/host/xhci-pci-renesas.c
> @@ -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 <gregkh@linuxfoundation.org>
发送时间: 2022年7月27日 0:52
收件人: chenxingdi <chenxingdi@huawei.com>
抄送: mathias.nyman@intel.com; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; chunkeey@googlemail.com
主题: Re: [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success
On Tue, Jul 26, 2022 at 02:05:09PM +0800, Chen Xingdi wrote:
> 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.
>
> Signed-off-by: Chen Xingdi <chenxingdi@huawei.com>
> ---
> drivers/usb/host/xhci-pci-renesas.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci-pci-renesas.c
> b/drivers/usb/host/xhci-pci-renesas.c
> index 52599d96634f..1eb1d863d545 100644
> --- a/drivers/usb/host/xhci-pci-renesas.c
> +++ b/drivers/usb/host/xhci-pci-renesas.c
> @@ -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
When drivers are working properly, they should be quiet.
Signed-off-by: Chen Xingdi <chenxingdi@huawei.com>
---
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(-)
diff --git a/drivers/usb/host/xhci-pci-renesas.c b/drivers/usb/host/xhci-pci-renesas.c
index 52599d96634f..93f8b355bc70 100644
--- a/drivers/usb/host/xhci-pci-renesas.c
+++ b/drivers/usb/host/xhci-pci-renesas.c
@@ -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;
}
--
2.17.1
© 2016 - 2026 Red Hat, Inc.