All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] coding-style: Add guidance to prefer dev_dbg
@ 2024-01-26  0:53 Abhishek Pandit-Subedi
  2024-01-26  1:28 ` Greg KH
  2024-01-30 21:03 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Abhishek Pandit-Subedi @ 2024-01-26  0:53 UTC (permalink / raw)
  To: gregkh
  Cc: Abhishek Pandit-Subedi, Jonathan Corbet, linux-doc, linux-kernel,
	workflows

During review, it was suggested that drivers only emit messages when
something is wrong or it is a debug message. Document this as a formal
recommendation.

https://lore.kernel.org/linux-usb/2024012525-alienate-frown-916b@gregkh/

Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
---
I'm sending up the change to documentation while this is still fresh.
Will send an update to checkpatch.pl afterwards.

 Documentation/process/coding-style.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
index c48382c6b477..f8ec23fa89bc 100644
--- a/Documentation/process/coding-style.rst
+++ b/Documentation/process/coding-style.rst
@@ -899,7 +899,8 @@ which you should use to make sure messages are matched to the right device
 and driver, and are tagged with the right level:  dev_err(), dev_warn(),
 dev_info(), and so forth.  For messages that aren't associated with a
 particular device, <linux/printk.h> defines pr_notice(), pr_info(),
-pr_warn(), pr_err(), etc.
+pr_warn(), pr_err(), etc. When drivers are working properly they are quiet,
+so prefer to use dev_dbg/pr_debug unless something is wrong.
 
 Coming up with good debugging messages can be quite a challenge; and once
 you have them, they can be a huge help for remote troubleshooting.  However
-- 
2.43.0.429.g432eaa2c6b-goog


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

* Re: [PATCH] coding-style: Add guidance to prefer dev_dbg
  2024-01-26  0:53 [PATCH] coding-style: Add guidance to prefer dev_dbg Abhishek Pandit-Subedi
@ 2024-01-26  1:28 ` Greg KH
  2024-01-30 21:03 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2024-01-26  1:28 UTC (permalink / raw)
  To: Abhishek Pandit-Subedi
  Cc: Jonathan Corbet, linux-doc, linux-kernel, workflows

On Thu, Jan 25, 2024 at 04:53:11PM -0800, Abhishek Pandit-Subedi wrote:
> During review, it was suggested that drivers only emit messages when
> something is wrong or it is a debug message. Document this as a formal
> recommendation.
> 
> https://lore.kernel.org/linux-usb/2024012525-alienate-frown-916b@gregkh/
> 
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

* Re: [PATCH] coding-style: Add guidance to prefer dev_dbg
  2024-01-26  0:53 [PATCH] coding-style: Add guidance to prefer dev_dbg Abhishek Pandit-Subedi
  2024-01-26  1:28 ` Greg KH
@ 2024-01-30 21:03 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2024-01-30 21:03 UTC (permalink / raw)
  To: Abhishek Pandit-Subedi, gregkh
  Cc: Abhishek Pandit-Subedi, linux-doc, linux-kernel, workflows

Abhishek Pandit-Subedi <abhishekpandit@chromium.org> writes:

> During review, it was suggested that drivers only emit messages when
> something is wrong or it is a debug message. Document this as a formal
> recommendation.
>
> https://lore.kernel.org/linux-usb/2024012525-alienate-frown-916b@gregkh/
>
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
> I'm sending up the change to documentation while this is still fresh.
> Will send an update to checkpatch.pl afterwards.
>
>  Documentation/process/coding-style.rst | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
> index c48382c6b477..f8ec23fa89bc 100644
> --- a/Documentation/process/coding-style.rst
> +++ b/Documentation/process/coding-style.rst
> @@ -899,7 +899,8 @@ which you should use to make sure messages are matched to the right device
>  and driver, and are tagged with the right level:  dev_err(), dev_warn(),
>  dev_info(), and so forth.  For messages that aren't associated with a
>  particular device, <linux/printk.h> defines pr_notice(), pr_info(),
> -pr_warn(), pr_err(), etc.
> +pr_warn(), pr_err(), etc. When drivers are working properly they are quiet,
> +so prefer to use dev_dbg/pr_debug unless something is wrong.
>  

Applied, thanks.

jon

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

end of thread, other threads:[~2024-01-30 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26  0:53 [PATCH] coding-style: Add guidance to prefer dev_dbg Abhishek Pandit-Subedi
2024-01-26  1:28 ` Greg KH
2024-01-30 21:03 ` Jonathan Corbet

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.