From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: "xinhui.pan" <xinhuix.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
yanmin_zhang-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
bo.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH] i2c-designware-pcidrv: fix the incorrect return of idle callback
Date: Tue, 28 Jan 2014 19:30:35 +0100 [thread overview]
Message-ID: <20140128183035.GC20789@katana> (raw)
In-Reply-To: <52E744AC.2050606-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]
On Tue, Jan 28, 2014 at 01:48:28PM +0800, xinhui.pan wrote:
> From: "xinhui.pan" <xinhuix.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> i2c_dw_pci_runtime_idle should return -EBUSY rather than zero if it do success.
I don't understand...
> Otherwise rpm_idle will call pm_suspend again and that may cause pm_schedule_suspend delay invalidate.
>
> Signed-off-by: bo.he <bo.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: xinhui.pan <xinhuix.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index f6ed06c..96e81f6 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -190,8 +190,8 @@ static int i2c_dw_pci_runtime_idle(struct device *dev)
> int err = pm_schedule_suspend(dev, 500);
> dev_dbg(dev, "runtime_idle called\n");
>
> - if (err != 0)
> - return 0;
> + if (err)
> + return err;
> return -EBUSY;
... it does return EBUSY when pm_schedule_suspend() succeeds? It only
returns 0 if it does not succeed (for which I don't know if this is an
apropriate behaviour). Mika?
> }
>
> --
> 1.7.9.5
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-01-28 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 5:48 [PATCH] i2c-designware-pcidrv: fix the incorrect return of idle callback xinhui.pan
[not found] ` <52E744AC.2050606-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-01-28 18:30 ` Wolfram Sang [this message]
2014-01-29 2:03 ` xinhui.pan
[not found] ` <52E86175.6010300-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-01-29 7:35 ` xinhui.pan
2014-01-29 8:35 ` Mika Westerberg
[not found] ` <20140129083548.GG18029-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-01-29 10:00 ` xinhui.pan
[not found] ` <52E8D13A.1060100-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-01-29 10:38 ` Mika Westerberg
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=20140128183035.GC20789@katana \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=bo.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=xinhuix.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=yanmin_zhang-VuQAYsv1563Yd54FQh9/CA@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