All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Input: evbug - Remove an empty comment block
@ 2021-04-15 20:58 Christophe JAILLET
  2021-04-15 20:58 ` [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it Christophe JAILLET
  2021-04-25  5:26 ` [PATCH 1/2] Input: evbug - Remove an empty comment block Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Christophe JAILLET @ 2021-04-15 20:58 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: linux-input, linux-kernel, kernel-janitors, Christophe JAILLET

This is a left-over from commit 1a59d1b8e05e ("treewide: Replace GPLv2
boilerplate/reference with SPDX - rule 156")

Axe an empty and useless comment block.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/input/evbug.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/input/evbug.c b/drivers/input/evbug.c
index c0d0b121ae7e..e47bdf92088a 100644
--- a/drivers/input/evbug.c
+++ b/drivers/input/evbug.c
@@ -7,9 +7,6 @@
  *  Input driver event debug module - dumps all events into syslog
  */
 
-/*
- */
-
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/slab.h>
-- 
2.27.0


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

* [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it
  2021-04-15 20:58 [PATCH 1/2] Input: evbug - Remove an empty comment block Christophe JAILLET
@ 2021-04-15 20:58 ` Christophe JAILLET
  2021-04-15 23:52   ` Joe Perches
  2021-04-25  5:26 ` [PATCH 1/2] Input: evbug - Remove an empty comment block Dmitry Torokhov
  1 sibling, 1 reply; 4+ messages in thread
From: Christophe JAILLET @ 2021-04-15 20:58 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: linux-input, linux-kernel, kernel-janitors, Christophe JAILLET

'printk(KERN_DEBUG pr_fmt(...))' can be replaced by a much less verbose
'pr_debug()'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/input/evbug.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/input/evbug.c b/drivers/input/evbug.c
index e47bdf92088a..88ad88300181 100644
--- a/drivers/input/evbug.c
+++ b/drivers/input/evbug.c
@@ -21,8 +21,8 @@ MODULE_LICENSE("GPL");
 
 static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
 {
-	printk(KERN_DEBUG pr_fmt("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n"),
-	       dev_name(&handle->dev->dev), type, code, value);
+	pr_debug("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
+		 dev_name(&handle->dev->dev), type, code, value);
 }
 
 static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
@@ -47,10 +47,10 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
 	if (error)
 		goto err_unregister_handle;
 
-	printk(KERN_DEBUG pr_fmt("Connected device: %s (%s at %s)\n"),
-	       dev_name(&dev->dev),
-	       dev->name ?: "unknown",
-	       dev->phys ?: "unknown");
+	pr_debug("Connected device: %s (%s at %s)\n",
+		 dev_name(&dev->dev),
+		 dev->name ?: "unknown",
+		 dev->phys ?: "unknown");
 
 	return 0;
 
@@ -63,8 +63,8 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
 
 static void evbug_disconnect(struct input_handle *handle)
 {
-	printk(KERN_DEBUG pr_fmt("Disconnected device: %s\n"),
-	       dev_name(&handle->dev->dev));
+	pr_debug("Disconnected device: %s\n",
+		 dev_name(&handle->dev->dev));
 
 	input_close_device(handle);
 	input_unregister_handle(handle);
-- 
2.27.0


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

* Re: [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it
  2021-04-15 20:58 ` [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it Christophe JAILLET
@ 2021-04-15 23:52   ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2021-04-15 23:52 UTC (permalink / raw)
  To: Christophe JAILLET, dmitry.torokhov
  Cc: linux-input, linux-kernel, kernel-janitors

On Thu, 2021-04-15 at 22:58 +0200, Christophe JAILLET wrote:
> 'printk(KERN_DEBUG pr_fmt(...))' can be replaced by a much less verbose
> 'pr_debug()'.

This is not really true because
	printk(KERN_DEBUG ...);
will _always_ be emitted if the console level allows
	pr_debug(...);
will _only_ be emitted if the console level allows _and_
	DEBUG is defined or dynamic_debug is enabled
		(and for dynamic_debug, only if specifically enabled)
	DEBUG is defined and dynamic_debug is enabled

> diff --git a/drivers/input/evbug.c b/drivers/input/evbug.c
[]
> @@ -21,8 +21,8 @@ MODULE_LICENSE("GPL");
>  
> 
>  static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
>  {
> -	printk(KERN_DEBUG pr_fmt("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n"),
> -	       dev_name(&handle->dev->dev), type, code, value);
> +	pr_debug("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
> +		 dev_name(&handle->dev->dev), type, code, value);
>  }



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

* Re: [PATCH 1/2] Input: evbug - Remove an empty comment block
  2021-04-15 20:58 [PATCH 1/2] Input: evbug - Remove an empty comment block Christophe JAILLET
  2021-04-15 20:58 ` [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it Christophe JAILLET
@ 2021-04-25  5:26 ` Dmitry Torokhov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2021-04-25  5:26 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: linux-input, linux-kernel, kernel-janitors

On Thu, Apr 15, 2021 at 10:58:16PM +0200, Christophe JAILLET wrote:
> This is a left-over from commit 1a59d1b8e05e ("treewide: Replace GPLv2
> boilerplate/reference with SPDX - rule 156")
> 
> Axe an empty and useless comment block.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied, thank you.

-- 
Dmitry

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

end of thread, other threads:[~2021-04-25  5:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 20:58 [PATCH 1/2] Input: evbug - Remove an empty comment block Christophe JAILLET
2021-04-15 20:58 ` [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it Christophe JAILLET
2021-04-15 23:52   ` Joe Perches
2021-04-25  5:26 ` [PATCH 1/2] Input: evbug - Remove an empty comment block Dmitry Torokhov

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.