lkml.org 
[lkml]   [2019]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] cdrom: make debug logging rely on pr_debug and debugfs only.
From
Date
On Sun, 2019-08-25 at 22:58 +0100, Diego Elio Pettenò wrote:
> The cdrom driver predates debugfs and most of the modern debugging
> facilities, so instead it has been includings a module parameter and an
> ioctl to enable debug messages.
>
> In 2019, debugfs and dynamic debug makes most of that redundant, and even
> confusing when trying to trace things in the dept of the driver.
[]
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
[]
> @@ -591,7 +556,7 @@ int register_cdrom(struct cdrom_device_info *cdi)
> static char banner_printed;
> const struct cdrom_device_ops *cdo = cdi->ops;
>
> - cd_dbg(CD_OPEN, "entering register_cdrom\n");
> + pr_debug("entering register_cdrom\n");

debut output for function tracing can also be removed
and ftrace used instead.

> @@ -643,7 +608,7 @@ int register_cdrom(struct cdrom_device_info *cdi)
>
> void unregister_cdrom(struct cdrom_device_info *cdi)
> {
> - cd_dbg(CD_OPEN, "entering unregister_cdrom\n");
> + pr_debug("entering unregister_cdrom\n");

etc...


\
 
 \ /
  Last update: 2019-08-26 00:23    [W:0.046 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site