From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Shubhrajyoti Datta
<omaplinuxkernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Laxman Dewangan
<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] i2c: tegra: remove warning dump if timeout happen in transfer
Date: Fri, 15 Feb 2013 14:04:17 +0100 [thread overview]
Message-ID: <20130215130417.GC21335@the-dreams.de> (raw)
In-Reply-To: <CAM=Q2csZyX5PvOPiSJ22u0SCXvh19y1qoC3+qJmmPfTQziM-tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, Feb 15, 2013 at 06:31:07PM +0530, Shubhrajyoti Datta wrote:
> On Thu, Feb 14, 2013 at 6:13 PM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> > If timeout error occurs in the i2c transfer then it was dumping warning
> > of call stack.
> >
> > Remove the warning dump as there is may be possibility that some slave
> > devices are busy and not responding the i2c communication.
> >
> > Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > ---
> > The patch is generated based on discussion happen between Stephena and
> > Wolfram on the patch:
> > i2c: add bcm2835 driver
> >
> > resending patch as Wolfram's email id has been changed.
> >
> > drivers/i2c/busses/i2c-tegra.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> > index ae2e027..36704e3 100644
> > --- a/drivers/i2c/busses/i2c-tegra.c
> > +++ b/drivers/i2c/busses/i2c-tegra.c
> > @@ -587,7 +587,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev,
> > ret = wait_for_completion_timeout(&i2c_dev->msg_complete, TEGRA_I2C_TIMEOUT);
> > tegra_i2c_mask_irq(i2c_dev, int_mask);
> >
> > - if (WARN_ON(ret == 0)) {
> > + if (ret == 0) {
>
> I think WARN_ON has a unlikely.
>
> If you could do a profiling and have the unlikely.
>
> BTW thats not an objection to the patch though.
The thing is: Timeouts can be expected on an I2C bus. Devices can be
busy, that's fine. So, no need for a WARN. I'm even thinking of asking
to remove the dev_err here, or at least change it into dev_warn, but
haven't made up my mind yet.
Regards,
Wolfram
next prev parent reply other threads:[~2013-02-15 13:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 12:43 [PATCH] i2c: tegra: remove warning dump if timeout happen in transfer Laxman Dewangan
2013-02-15 13:01 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2csZyX5PvOPiSJ22u0SCXvh19y1qoC3+qJmmPfTQziM-tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-15 13:04 ` Wolfram Sang [this message]
[not found] ` <1360845813-11334-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-15 19:18 ` Wolfram Sang
[not found] ` <20130215191826.GC4351-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-02-15 19:40 ` Stephen Warren
[not found] ` <511E8F3F.5010202-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-02-15 20:10 ` Wolfram Sang
-- strict thread matches above, loose matches on Subject: below --
2013-02-14 12:41 Laxman Dewangan
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=20130215130417.GC21335@the-dreams.de \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=omaplinuxkernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).