mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Diego Elio Pettenò" <flameeyes@flameeyes.com>,
	"Jens Axboe" <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cdrom: make debug logging rely on pr_debug and debugfs only.
Date: Sun, 25 Aug 2019 15:13:09 -0700	[thread overview]
Message-ID: <98427b15d2a5cc93c72867bb7800df6c38f1f7bf.camel@perches.com> (raw)
In-Reply-To: <20190825215833.25817-1-flameeyes@flameeyes.com>

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...



  reply	other threads:[~2019-08-25 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-25 21:58 Diego Elio Pettenò
2019-08-25 22:13 ` Joe Perches [this message]
2019-08-26 14:51   ` Diego Elio Pettenò

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98427b15d2a5cc93c72867bb7800df6c38f1f7bf.camel@perches.com \
    --to=joe@perches.com \
    --cc=axboe@kernel.dk \
    --cc=flameeyes@flameeyes.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®