[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200120085508.25522-3-u.kleine-koenig@pengutronix.de>
Date: Mon, 20 Jan 2020 09:55:08 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Cc: linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: [PATCH 2/2] driver core: convert probe error messages to use %de
With this change
rtc-s35390a: probe of 3-0030 failed with error -EIO
is emitted instead of
rtc-s35390a: probe of 3-0030 failed with error -5
. The former is more descriptive and so gives a better hint what is
actually broken. The actual value of the error code isn't of any
importance, so there is no relevant information lost.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
drivers/base/dd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index d811e60610d3..e4e308ac187b 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -620,13 +620,13 @@ static int really_probe(struct device *dev, struct device_driver *drv)
break;
case -ENODEV:
case -ENXIO:
- pr_debug("%s: probe of %s rejects match %d\n",
+ pr_debug("%s: probe of %s rejects match %de\n",
drv->name, dev_name(dev), ret);
break;
default:
/* driver matched but the probe failed */
printk(KERN_WARNING
- "%s: probe of %s failed with error %d\n",
+ "%s: probe of %s failed with error %de\n",
drv->name, dev_name(dev), ret);
}
/*
@@ -652,7 +652,7 @@ static int really_probe_debug(struct device *dev, struct device_driver *drv)
ret = really_probe(dev, drv);
rettime = ktime_get();
delta = ktime_sub(rettime, calltime);
- printk(KERN_DEBUG "probe of %s returned %d after %lld usecs\n",
+ printk(KERN_DEBUG "probe of %s returned %de after %lld usecs\n",
dev_name(dev), ret, (s64) ktime_to_us(delta));
return ret;
}
@@ -813,7 +813,7 @@ static int __device_attach_driver(struct device_driver *drv, void *_data)
dev_dbg(dev, "Device match requests probe deferral\n");
driver_deferred_probe_add(dev);
} else if (ret < 0) {
- dev_dbg(dev, "Bus failed to match device: %d", ret);
+ dev_dbg(dev, "Bus failed to match device: %de", ret);
return ret;
} /* ret > 0 means positive match */
@@ -1046,7 +1046,7 @@ static int __driver_attach(struct device *dev, void *data)
dev_dbg(dev, "Device match requests probe deferral\n");
driver_deferred_probe_add(dev);
} else if (ret < 0) {
- dev_dbg(dev, "Bus failed to match device: %d", ret);
+ dev_dbg(dev, "Bus failed to match device: %de", ret);
return ret;
} /* ret > 0 means positive match */
--
2.24.0
Powered by blists - more mailing lists