[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jW3qu+ctS8h3BwZeQBD_6sF+yCPoQ1P-hEBidmOyWRkw@mail.gmail.com>
Date: Thu, 20 Dec 2018 12:04:20 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Andrzej Hajda <a.hajda@...sung.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
javierm@...hat.com,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Mark Brown <broonie@...nel.org>,
Russell King - ARM Linux <linux@...linux.org.uk>
Subject: Re: [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@...sung.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@...sung.com>
> Reviewed-by: Mark Brown <broonie@...nel.org>
> Reviewed-by: Javier Martinez Canillas <javierm@...hat.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.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;
> };
Powered by blists - more mailing lists