lkml.org 
[lkml]   [2018]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 2/3] driver core: add deferring probe reason to devices_deferred property
On Thu, Dec 20, 2018 at 11:23 AM Andrzej Hajda <a.hajda@samsung.com> wrote:
>
> /sys/kernel/debug/devices_deferred property contains list of deferred devices.
> This list does not contain reason why the driver deferred probe, the patch
> improves it.
> The natural place to set the reason is probe_err function introduced recently,
> ie. if probe_err will be called with -EPROBE_DEFER instead of printk the message
> will be attached to deferred device and printed when user read devices_deferred
> property.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> Reviewed-by: Mark Brown <broonie@kernel.org>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> ---
> v4:
> - removed NULL check before kfree,
> - coding style tweaking.
> v3:
> - adjusted deferred_devs_show, to accept newline ended messages,
> - changed conditonal check to positive,
> - added R-b by Andy.
> v2:
> - changed __deferred_probe_set_msg args - like in __dev_printk, fits better,
> - use kasprintf instead of bunch of code,
> - keep consistent format of devices_deferred lines,
> - added R-Bs (again I hope changes above are not against it).
> ---
> ---
> drivers/base/base.h | 3 +++
> drivers/base/core.c | 9 +++++----
> drivers/base/dd.c | 21 ++++++++++++++++++++-
> 3 files changed, 28 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/base/base.h b/drivers/base/base.h
> index 7a419a7a6235..effbd5e7f9f1 100644
> --- a/drivers/base/base.h
> +++ b/drivers/base/base.h
> @@ -75,6 +75,7 @@ struct device_private {
> struct klist_node knode_driver;
> struct klist_node knode_bus;
> struct list_head deferred_probe;
> + char *deferred_probe_msg;

Many drivers will never use this, so is the memory overhead justified?

> struct device *device;
> };

\
 
 \ /
  Last update: 2018-12-20 12:05    [W:0.128 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site