From: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Ioan Nicu <ioan.nicu.ext-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
Peter Korsgaard
<peter.korsgaard-ob4gmnvZ1/cAvxtiuMwx3w@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Mathias Rulf
<mathias.rulf-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v2] i2c: i2c-mux-gpio: remove error messages for probe deferrals
Date: Thu, 02 Apr 2015 13:22:04 +0200 [thread overview]
Message-ID: <551D265C.40703@nokia.com> (raw)
In-Reply-To: <20150330130338.GB5933-w/hiR2Wfoz+b6vRP15A4uhaOaYmgohGe0e7PPNI6Mm0@public.gmane.org>
On 30/03/15 15:03, Ioan Nicu wrote:
> Probe deferral is not an error case. It happens only when
> the necessary dependencies are not there yet.
>
> The driver core is already printing a message when a driver
> requests probe deferral, so this can be traced in the logs
> without these error prints.
>
> This patch removes the error messages for these deferral cases.
>
> Signed-off-by: Ionut Nicu <ioan.nicu.ext-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Acked-by: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/i2c/muxes/i2c-mux-gpio.c | 10 +++-------
> 1 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
> index f5798eb..70db992 100644
> --- a/drivers/i2c/muxes/i2c-mux-gpio.c
> +++ b/drivers/i2c/muxes/i2c-mux-gpio.c
> @@ -76,10 +76,9 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
> return -ENODEV;
> }
> adapter = of_find_i2c_adapter_by_node(adapter_np);
> - if (!adapter) {
> - dev_err(&pdev->dev, "Cannot find parent bus\n");
> + if (!adapter)
> return -EPROBE_DEFER;
> - }
> +
> mux->data.parent = i2c_adapter_id(adapter);
> put_device(&adapter->dev);
>
> @@ -177,11 +176,8 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev)
> }
>
> parent = i2c_get_adapter(mux->data.parent);
> - if (!parent) {
> - dev_err(&pdev->dev, "Parent adapter (%d) not found\n",
> - mux->data.parent);
> + if (!parent)
> return -EPROBE_DEFER;
> - }
>
> mux->parent = parent;
> mux->gpio_base = gpio_base;
>
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
To: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ioan Nicu <ioan.nicu.ext@nokia.com>,
Peter Korsgaard <peter.korsgaard@barco.com>,
Wolfram Sang <wsa@the-dreams.de>,
Mathias Rulf <mathias.rulf@nokia.com>
Subject: Re: [PATCH v2] i2c: i2c-mux-gpio: remove error messages for probe deferrals
Date: Thu, 02 Apr 2015 13:22:04 +0200 [thread overview]
Message-ID: <551D265C.40703@nokia.com> (raw)
In-Reply-To: <20150330130338.GB5933@ulegcpding.emea.nsn-net.net>
On 30/03/15 15:03, Ioan Nicu wrote:
> Probe deferral is not an error case. It happens only when
> the necessary dependencies are not there yet.
>
> The driver core is already printing a message when a driver
> requests probe deferral, so this can be traced in the logs
> without these error prints.
>
> This patch removes the error messages for these deferral cases.
>
> Signed-off-by: Ionut Nicu <ioan.nicu.ext@nokia.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> ---
> drivers/i2c/muxes/i2c-mux-gpio.c | 10 +++-------
> 1 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
> index f5798eb..70db992 100644
> --- a/drivers/i2c/muxes/i2c-mux-gpio.c
> +++ b/drivers/i2c/muxes/i2c-mux-gpio.c
> @@ -76,10 +76,9 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
> return -ENODEV;
> }
> adapter = of_find_i2c_adapter_by_node(adapter_np);
> - if (!adapter) {
> - dev_err(&pdev->dev, "Cannot find parent bus\n");
> + if (!adapter)
> return -EPROBE_DEFER;
> - }
> +
> mux->data.parent = i2c_adapter_id(adapter);
> put_device(&adapter->dev);
>
> @@ -177,11 +176,8 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev)
> }
>
> parent = i2c_get_adapter(mux->data.parent);
> - if (!parent) {
> - dev_err(&pdev->dev, "Parent adapter (%d) not found\n",
> - mux->data.parent);
> + if (!parent)
> return -EPROBE_DEFER;
> - }
>
> mux->parent = parent;
> mux->gpio_base = gpio_base;
>
next prev parent reply other threads:[~2015-04-02 11:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 13:03 [PATCH v2] i2c: i2c-mux-gpio: remove error messages for probe deferrals Ioan Nicu
[not found] ` <20150330130338.GB5933-w/hiR2Wfoz+b6vRP15A4uhaOaYmgohGe0e7PPNI6Mm0@public.gmane.org>
2015-04-02 11:22 ` Alexander Sverdlin [this message]
2015-04-02 11:22 ` Alexander Sverdlin
[not found] ` <551D265C.40703-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2015-04-02 11:25 ` Peter Korsgaard
2015-04-02 11:25 ` Peter Korsgaard
2015-04-03 20:00 ` Wolfram Sang
2015-04-03 20:00 ` Wolfram Sang
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=551D265C.40703@nokia.com \
--to=alexander.sverdlin-xnzwkgviw5gavxtiumwx3w@public.gmane.org \
--cc=ioan.nicu.ext-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mathias.rulf-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
--cc=peter.korsgaard-ob4gmnvZ1/cAvxtiuMwx3w@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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.