mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Todd Poynor <toddpoynor@gmail.com>
To: Rob Springer <rspringer@google.com>,
	John Joseph <jnjoseph@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 04/10] staging: gasket: ioctl: convert to standard logging
Date: Thu, 26 Jul 2018 20:07:31 -0700	[thread overview]
Message-ID: <20180727030737.231268-5-toddpoynor@gmail.com> (raw)
In-Reply-To: <20180727030737.231268-1-toddpoynor@gmail.com>

From: Todd Poynor <toddpoynor@google.com>

Replace gasket logging calls with standard logging calls.

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

diff --git a/drivers/staging/gasket/gasket_ioctl.c b/drivers/staging/gasket/gasket_ioctl.c
index 63e139ab7ff89..78a132a60cc4f 100644
--- a/drivers/staging/gasket/gasket_ioctl.c
+++ b/drivers/staging/gasket/gasket_ioctl.c
@@ -5,9 +5,9 @@
 #include "gasket_constants.h"
 #include "gasket_core.h"
 #include "gasket_interrupt.h"
-#include "gasket_logging.h"
 #include "gasket_page_table.h"
 #include <linux/compiler.h>
+#include <linux/device.h>
 #include <linux/fs.h>
 #include <linux/uaccess.h>
 
@@ -73,7 +73,7 @@ long gasket_handle_ioctl(struct file *filp, uint cmd, void __user *argp)
 		}
 	} else if (!gasket_ioctl_check_permissions(filp, cmd)) {
 		trace_gasket_ioctl_exit(-EPERM);
-		gasket_log_debug(gasket_dev, "ioctl cmd=%x noperm.", cmd);
+		dev_dbg(gasket_dev->dev, "ioctl cmd=%x noperm\n", cmd);
 		return -EPERM;
 	}
 
@@ -132,10 +132,9 @@ long gasket_handle_ioctl(struct file *filp, uint cmd, void __user *argp)
 		 * the arg.
 		 */
 		trace_gasket_ioctl_integer_data(arg);
-		gasket_log_debug(
-			gasket_dev,
+		dev_dbg(gasket_dev->dev,
 			"Unknown ioctl cmd=0x%x not caught by "
-			"gasket_is_supported_ioctl",
+			"gasket_is_supported_ioctl\n",
 			cmd);
 		retval = -EINVAL;
 		break;
@@ -186,12 +185,9 @@ static bool gasket_ioctl_check_permissions(struct file *filp, uint cmd)
 	struct gasket_dev *gasket_dev = (struct gasket_dev *)filp->private_data;
 
 	alive = (gasket_dev->status == GASKET_STATUS_ALIVE);
-	if (!alive) {
-		gasket_nodev_error(
-			"%s alive %d status %d.",
-			__func__,
-			alive, gasket_dev->status);
-	}
+	if (!alive)
+		dev_dbg(gasket_dev->dev, "%s alive %d status %d\n",
+			__func__, alive, gasket_dev->status);
 
 	read = !!(filp->f_mode & FMODE_READ);
 	write = !!(filp->f_mode & FMODE_WRITE);
@@ -329,9 +325,8 @@ static int gasket_partition_page_table(
 		gasket_dev->page_table[ibuf.page_table_index]);
 
 	if (ibuf.size > max_page_table_size) {
-		gasket_log_debug(
-			gasket_dev,
-			"Partition request 0x%llx too large, max is 0x%x.",
+		dev_dbg(gasket_dev->dev,
+			"Partition request 0x%llx too large, max is 0x%x\n",
 			ibuf.size, max_page_table_size);
 		return -EINVAL;
 	}
-- 
2.18.0.345.g5c9ce644c3-goog


  parent reply	other threads:[~2018-07-27  3:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  3:07 [PATCH 00/10] staging: gasket: logging cleanups Todd Poynor
2018-07-27  3:07 ` [PATCH 01/10] staging: gasket: save struct device for a gasket device Todd Poynor
2018-07-27 15:08   ` Greg Kroah-Hartman
2018-07-27 17:02     ` Todd Poynor
2018-07-27  3:07 ` [PATCH 02/10] staging: gasket: core: convert to standard logging Todd Poynor
2018-07-27  3:07 ` [PATCH 03/10] staging: gasket: interrupt: " Todd Poynor
2018-07-27  3:07 ` Todd Poynor [this message]
2018-07-27  3:07 ` [PATCH 05/10] staging: gasket: page table: " Todd Poynor
2018-07-27  3:07 ` [PATCH 06/10] staging: gasket: sysfs: " Todd Poynor
2018-07-27 15:07   ` Greg Kroah-Hartman
2018-07-27 17:00     ` Todd Poynor
2018-07-27  3:07 ` [PATCH 07/10] staging: gasket: apex: " Todd Poynor
2018-07-27  3:07 ` [PATCH 08/10] staging: gasket: remove gasket logging header Todd Poynor
2018-07-27  3:07 ` [PATCH 09/10] staging: gasket: TODO: remove entry for convert to standard logging Todd Poynor
2018-07-27  3:07 ` [PATCH 10/10] staging: gasket: don't print device addresses as kernel pointers Todd Poynor

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=20180727030737.231268-5-toddpoynor@gmail.com \
    --to=toddpoynor@gmail.com \
    --cc=benchan@chromium.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jnjoseph@google.com \
    --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

Powered by JetHome