From: Stuart Yoder <stuart.yoder@nxp.com>
To: <gregkh@linuxfoundation.org>
Cc: <german.rivera@nxp.com>, <devel@driverdev.osuosl.org>,
<linux-kernel@vger.kernel.org>, <agraf@suse.de>, <arnd@arndb.de>,
<leoyang.li@nxp.com>, Stuart Yoder <stuart.yoder@nxp.com>
Subject: [PATCH 11/14] staging: fsl-mc: message cleanup
Date: Mon, 17 Oct 2016 13:43:39 -0500 [thread overview]
Message-ID: <1476729819-10219-1-git-send-email-stuart.yoder@nxp.com> (raw)
Cleanup and clarify messages
-use "fsl-mc" prefix for all messages that don't come from dev_*
functions
-remove unnecessary verbosity to make things clearer
-use explicit __func__ arguments to clarify some error messages
-improve misc wording for clarity
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
---
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 4 ++--
drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 30 +++++++++++----------------
2 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
index cf10148..e92c780 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
@@ -605,7 +605,7 @@ static int fsl_mc_allocator_probe(struct fsl_mc_device *mc_dev)
return error;
dev_dbg(&mc_dev->dev,
- "Allocatable MC object device bound to fsl_mc_allocator driver");
+ "Allocatable fsl-mc device bound to fsl_mc_allocator driver");
return 0;
}
@@ -627,7 +627,7 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev)
}
dev_dbg(&mc_dev->dev,
- "Allocatable MC object device unbound from fsl_mc_allocator driver");
+ "Allocatable fsl-mc device unbound from fsl_mc_allocator driver");
return 0;
}
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
index 44f64b6..936e3ee 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
@@ -164,8 +164,7 @@ static int fsl_mc_driver_probe(struct device *dev)
error = mc_drv->probe(mc_dev);
if (error < 0) {
- dev_err(dev, "MC object device probe callback failed: %d\n",
- error);
+ dev_err(dev, "%s failed: %d\n", __func__, error);
return error;
}
@@ -183,9 +182,7 @@ static int fsl_mc_driver_remove(struct device *dev)
error = mc_drv->remove(mc_dev);
if (error < 0) {
- dev_err(dev,
- "MC object device remove callback failed: %d\n",
- error);
+ dev_err(dev, "%s failed: %d\n", __func__, error);
return error;
}
@@ -227,13 +224,12 @@ int __fsl_mc_driver_register(struct fsl_mc_driver *mc_driver,
error = driver_register(&mc_driver->driver);
if (error < 0) {
- pr_err("driver_register() failed for %s: %d\n",
+ pr_err("fsl-mc: driver_register() failed for %s: %d\n",
mc_driver->driver.name, error);
return error;
}
- pr_info("MC object device driver %s registered\n",
- mc_driver->driver.name);
+ pr_info("fsl-mc: driver %s registered\n", mc_driver->driver.name);
return 0;
}
EXPORT_SYMBOL_GPL(__fsl_mc_driver_register);
@@ -572,8 +568,7 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
}
(void)get_device(&mc_dev->dev);
- dev_dbg(parent_dev, "Added MC object device %s\n",
- dev_name(&mc_dev->dev));
+ dev_dbg(parent_dev, "added %s\n", dev_name(&mc_dev->dev));
*new_mc_dev = mc_dev;
return 0;
@@ -749,7 +744,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
struct mc_version mc_version;
struct resource res;
- dev_info(&pdev->dev, "Root MC bus device probed");
+ dev_info(&pdev->dev, "root DPRC probed");
mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL);
if (!mc)
@@ -783,8 +778,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
goto error_cleanup_mc_io;
}
- dev_info(&pdev->dev,
- "Freescale Management Complex Firmware version: %u.%u.%u\n",
+ dev_info(&pdev->dev, "MC firmware version: %u.%u.%u\n",
mc_version.major, mc_version.minor, mc_version.revision);
error = get_mc_addr_translation_ranges(&pdev->dev,
@@ -840,7 +834,7 @@ static int fsl_mc_bus_remove(struct platform_device *pdev)
fsl_destroy_mc_io(mc->root_mc_bus_dev->mc_io);
mc->root_mc_bus_dev->mc_io = NULL;
- dev_info(&pdev->dev, "Root MC bus device removed");
+ dev_info(&pdev->dev, "root DPRC removed");
return 0;
}
@@ -869,21 +863,21 @@ static int __init fsl_mc_bus_driver_init(void)
sizeof(struct fsl_mc_device), 0, 0,
NULL);
if (!mc_dev_cache) {
- pr_err("Could not create fsl_mc_device cache\n");
+ pr_err("fsl-mc: could not create fsl_mc_device cache\n");
return -ENOMEM;
}
error = bus_register(&fsl_mc_bus_type);
if (error < 0) {
- pr_err("fsl-mc bus type registration failed: %d\n", error);
+ pr_err("fsl-mc: bus registration failed: %d\n", error);
goto error_cleanup_cache;
}
- pr_info("fsl-mc bus type registered\n");
+ pr_info("fsl-mc: bus registered\n");
error = platform_driver_register(&fsl_mc_bus_driver);
if (error < 0) {
- pr_err("platform_driver_register() failed: %d\n", error);
+ pr_err("fsl-mc: driver registration failed: %d\n", error);
goto error_cleanup_bus;
}
--
1.9.0
next reply other threads:[~2016-10-17 19:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 18:43 Stuart Yoder [this message]
2016-10-25 7:47 ` [PATCH 11/14] staging: fsl-mc: message cleanup Greg KH
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=1476729819-10219-1-git-send-email-stuart.yoder@nxp.com \
--to=stuart.yoder@nxp.com \
--cc=agraf@suse.de \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=german.rivera@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=leoyang.li@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.