All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success
@ 2022-07-26  6:05 Chen Xingdi
  2022-07-26 16:51 ` Greg KH
  2022-07-27  3:11 ` [PATCH v2 -next] usb: renesas-xhci: Do not print any log while fw verif success Chen Xingdi
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Xingdi @ 2022-07-26  6:05 UTC (permalink / raw)
  To: mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel, chunkeey, chenxingdi

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success
  2022-07-26  6:05 [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success Chen Xingdi
@ 2022-07-26 16:51 ` Greg KH
  2022-07-27  2:07   ` 答复: " chenxingdi
  2022-07-27  3:11 ` [PATCH v2 -next] usb: renesas-xhci: Do not print any log while fw verif success Chen Xingdi
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2022-07-26 16:51 UTC (permalink / raw)
  To: Chen Xingdi; +Cc: mathias.nyman, linux-usb, linux-kernel, chunkeey

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 答复: [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success
  2022-07-26 16:51 ` Greg KH
@ 2022-07-27  2:07   ` chenxingdi
  0 siblings, 0 replies; 4+ messages in thread
From: chenxingdi @ 2022-07-27  2:07 UTC (permalink / raw)
  To: Greg KH
  Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, chunkeey@googlemail.com

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 -next] usb: renesas-xhci: Do not print any log while fw verif success
  2022-07-26  6:05 [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success Chen Xingdi
  2022-07-26 16:51 ` Greg KH
@ 2022-07-27  3:11 ` Chen Xingdi
  1 sibling, 0 replies; 4+ messages in thread
From: Chen Xingdi @ 2022-07-27  3:11 UTC (permalink / raw)
  To: mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel, chunkeey, chenxingdi

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-27  3:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26  6:05 [PATCH -next] usb: renesas-xhci: Use pr_info while fw verify success Chen Xingdi
2022-07-26 16:51 ` Greg KH
2022-07-27  2:07   ` 答复: " chenxingdi
2022-07-27  3:11 ` [PATCH v2 -next] usb: renesas-xhci: Do not print any log while fw verif success Chen Xingdi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.