lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82fc2a9a0df1fa6c901645693cca2eab34d5f032.camel@perches.com>
Date:   Thu, 15 Apr 2021 16:52:27 -0700
From:   Joe Perches <joe@...ches.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        dmitry.torokhov@...il.com
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of
 hand-writing it

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);
>  }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ