All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/14] staging: fsl-mc: message cleanup
@ 2016-10-17 18:43 Stuart Yoder
  2016-10-25  7:47 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Stuart Yoder @ 2016-10-17 18:43 UTC (permalink / raw)
  To: gregkh
  Cc: german.rivera, devel, linux-kernel, agraf, arnd, leoyang.li,
	Stuart Yoder

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 11/14] staging: fsl-mc: message cleanup
  2016-10-17 18:43 [PATCH 11/14] staging: fsl-mc: message cleanup Stuart Yoder
@ 2016-10-25  7:47 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-10-25  7:47 UTC (permalink / raw)
  To: Stuart Yoder; +Cc: german.rivera, devel, linux-kernel, agraf, arnd, leoyang.li

On Mon, Oct 17, 2016 at 01:43:39PM -0500, Stuart Yoder wrote:
> Cleanup and clarify messages
>   -use "fsl-mc" prefix for all messages that don't come from dev_*
>    functions

Nope, please use the proper pr_fmt() #define at the top of the file,
that way you don't have to put the string into all pr_* calls.

>   -remove unnecessary verbosity to make things clearer
>   -use explicit __func__ arguments to clarify some error messages
>   -improve misc wording for clarity

That's alot of different things.  Again, if you have to list the
different things you do in a patch, that means you should break it up
into smaller ones.  Yes, this is a "tiny" patch, but I can't take it
because of the above problem, while if you had broken it up into smaller
ones, I could have taken all but the pr_* changes :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-25  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 18:43 [PATCH 11/14] staging: fsl-mc: message cleanup Stuart Yoder
2016-10-25  7:47 ` Greg KH

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.