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: Dmitry Torokhov <dtor@chromium.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 3/4] staging: gasket: core: add subsystem and device info to logs
Date: Thu, 2 Aug 2018 18:49:51 -0700 [thread overview]
Message-ID: <20180803014952.104582-4-toddpoynor@gmail.com> (raw)
In-Reply-To: <20180803014952.104582-1-toddpoynor@gmail.com>
From: Todd Poynor <toddpoynor@google.com>
Identify gasket as the subsystem printing various messages.
Add the driver name to appropriate messages to indicate which driver
has a problem.
Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
drivers/staging/gasket/gasket_core.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index 91db71c238804..93a4d9f08eaab 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/gasket_core.c
@@ -6,6 +6,9 @@
*
* Copyright (C) 2018 Google, Inc.
*/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include "gasket_core.h"
#include "gasket_interrupt.h"
@@ -208,7 +211,7 @@ static int gasket_alloc_dev(struct gasket_internal_desc *internal_desc,
gasket_dev = *pdev = kzalloc(sizeof(*gasket_dev), GFP_KERNEL);
if (!gasket_dev) {
- pr_err("no memory for device\n");
+ pr_err("no memory for device %s\n", kobj_name);
return -ENOMEM;
}
internal_desc->devs[dev_idx] = gasket_dev;
@@ -1760,7 +1763,7 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc)
mutex_unlock(&g_mutex);
if (desc_idx == -1) {
- pr_err("Too many Gasket drivers loaded: %d\n",
+ pr_err("too many drivers loaded, max %d\n",
GASKET_FRAMEWORK_DESC_MAX);
return -EBUSY;
}
@@ -1790,7 +1793,8 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc)
ret = __pci_register_driver(&internal->pci, driver_desc->module,
driver_desc->name);
if (ret) {
- pr_err("cannot register pci driver [ret=%d]\n", ret);
+ pr_err("cannot register %s pci driver [ret=%d]\n",
+ driver_desc->name, ret);
goto fail1;
}
@@ -1798,7 +1802,8 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc)
driver_desc->minor), GASKET_DEV_MAX,
driver_desc->name);
if (ret) {
- pr_err("cannot register char driver [ret=%d]\n", ret);
+ pr_err("cannot register %s char driver [ret=%d]\n",
+ driver_desc->name, ret);
goto fail2;
}
--
2.18.0.597.ga71716f1ad-goog
next prev parent reply other threads:[~2018-08-03 1:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 1:49 [PATCH 0/4 v2] staging: gasket: cleanups du jour Todd Poynor
2018-08-03 1:49 ` [PATCH 1/4] staging: gasket: core: remove registration logs Todd Poynor
2018-08-03 1:49 ` [PATCH 2/4] staging: gasket: core: device register debug log cleanups Todd Poynor
2018-08-03 1:49 ` Todd Poynor [this message]
2018-08-03 1:49 ` [PATCH 4/4] Revert "staging: gasket: core: hold reference to pci_dev while used" 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=20180803014952.104582-4-toddpoynor@gmail.com \
--to=toddpoynor@gmail.com \
--cc=benchan@chromium.org \
--cc=devel@driverdev.osuosl.org \
--cc=dtor@chromium.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
all inboxes | Powered by JetHome®