linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Todd Poynor <toddpoynor@gmail.com>
To: Rob Springer <rspringer@google.com>,
	Ben Chan <benchan@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 01/11] staging: gasket: core: debug log updates
Date: Sun, 14 Oct 2018 21:59:17 -0700	[thread overview]
Message-ID: <20181015045927.156790-2-toddpoynor@gmail.com> (raw)
In-Reply-To: <20181015045927.156790-1-toddpoynor@gmail.com>

From: Todd Poynor <toddpoynor@google.com>

Add debug logs for device enable/disable events, remove logs for
callbacks (the called functions can generate their own logs if needed).

Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
 drivers/staging/gasket/gasket_core.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index f230bec76ae4e..62a7515915e59 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/gasket_core.c
@@ -109,8 +109,6 @@ check_and_invoke_callback(struct gasket_dev *gasket_dev,
 {
 	int ret = 0;
 
-	dev_dbg(gasket_dev->dev, "check_and_invoke_callback %p\n",
-		cb_function);
 	if (cb_function) {
 		mutex_lock(&gasket_dev->mutex);
 		ret = cb_function(gasket_dev);
@@ -126,11 +124,8 @@ gasket_check_and_invoke_callback_nolock(struct gasket_dev *gasket_dev,
 {
 	int ret = 0;
 
-	if (cb_function) {
-		dev_dbg(gasket_dev->dev,
-			"Invoking device-specific callback.\n");
+	if (cb_function)
 		ret = cb_function(gasket_dev);
-	}
 	return ret;
 }
 
@@ -633,6 +628,7 @@ void gasket_disable_device(struct gasket_dev *gasket_dev)
 		gasket_dev->internal_desc->driver_desc;
 	int i;
 
+	dev_dbg(gasket_dev->dev, "disabling device\n");
 	/* Only delete the device if it has been successfully added. */
 	if (gasket_dev->dev_info.cdev_added)
 		cdev_del(&gasket_dev->dev_info.cdev);
@@ -1357,6 +1353,7 @@ int gasket_enable_device(struct gasket_dev *gasket_dev)
 	const struct gasket_driver_desc *driver_desc =
 		gasket_dev->internal_desc->driver_desc;
 
+	dev_dbg(gasket_dev->dev, "enabling device\n");
 	ret = gasket_interrupt_init(gasket_dev);
 	if (ret) {
 		dev_err(gasket_dev->dev,
-- 
2.19.0.605.g01d371f741-goog


  reply	other threads:[~2018-10-15  5:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15  4:59 [PATCH 00/11] staging: gasket: fixes Todd Poynor
2018-10-15  4:59 ` Todd Poynor [this message]
2018-10-15  7:34   ` [PATCH 01/11] staging: gasket: core: debug log updates Greg Kroah-Hartman
2018-10-15 20:33     ` Todd Poynor
2018-10-15  4:59 ` [PATCH 02/11] staging: gasket: page table: return valid error code on map fail Todd Poynor
2018-10-15  4:59 ` [PATCH 03/11] staging: gasket: page table: remove dead code in coherent mem alloc Todd Poynor
2018-10-15  4:59 ` [PATCH 04/11] staging: gasket: page_table: remove unnecessary PTE status set to free Todd Poynor
2018-10-15  4:59 ` [PATCH 05/11] staging: gasket: page_table: rearrange gasket_page_table_entry Todd Poynor
2018-10-15  7:37   ` Greg Kroah-Hartman
2018-10-15  4:59 ` [PATCH 06/11] staging: gasket: page table: fixup error path allocating coherent mem Todd Poynor
2018-10-15  4:59 ` [PATCH 07/11] staging: gasket: page_table: fix comment in components_to_dev_address Todd Poynor
2018-10-15  4:59 ` [PATCH 08/11] staging: gasket: page_table: simplify gasket_components_to_dev_address Todd Poynor
2018-10-15  4:59 ` [PATCH 09/11] staging: gasket: apex: fix sysfs_show Todd Poynor
2018-10-15  4:59 ` [PATCH 10/11] staging: gasket: sysfs: fix attribute release comment Todd Poynor
2018-10-15  4:59 ` [PATCH 11/11] staging: gasket: Update device virtual address comment Todd Poynor
2018-10-15  7:33 ` [PATCH 00/11] staging: gasket: fixes Greg Kroah-Hartman
2018-10-15 10:19   ` Todd Poynor
2018-10-15 10:29 ` Christoph Hellwig
2018-10-15 10:35   ` Greg Kroah-Hartman

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=20181015045927.156790-2-toddpoynor@gmail.com \
    --to=toddpoynor@gmail.com \
    --cc=benchan@chromium.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rspringer@google.com \
    --cc=toddpoynor@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).