From: Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: "Vincent Stehlé"
<vincent.stehle-QFKgK+z4sOrR7s880joybQ@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] i2c-designware: define i2c_dw_pci_runtime_idle only with runtime pm
Date: Fri, 27 Sep 2013 11:22:59 +0300 [thread overview]
Message-ID: <20130927082259.GC28875@intel.com> (raw)
In-Reply-To: <20130927024313.GB3159@katana>
On Fri, Sep 27, 2013 at 04:43:13AM +0200, Wolfram Sang wrote:
> On Fri, Sep 27, 2013 at 12:24:03AM +0200, Vincent Stehlé wrote:
> > Make sure i2c_dw_pci_runtime_idle() is defined only when actually used, when
> > CONFIG_PM_RUNTIME is defined.
> >
> > This fixes the following compilation warning:
> >
> > drivers/i2c/busses/i2c-designware-pcidrv.c:188:12: warning: ‘i2c_dw_pci_runtime_idle’ defined but not used [-Wunused-function]
> >
> > Signed-off-by: Vincent Stehlé <vincent.stehle-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
> > Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
>
> I wonder if this fix is complete? Mika?
>
> > ---
> > drivers/i2c/busses/i2c-designware-pcidrv.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > index f6ed06c..2b5d3a6 100644
> > --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> > +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > @@ -185,6 +185,7 @@ static int i2c_dw_pci_resume(struct device *dev)
> > return 0;
> > }
> >
> > +#ifdef CONFIG_PM_RUNTIME
> > static int i2c_dw_pci_runtime_idle(struct device *dev)
> > {
> > int err = pm_schedule_suspend(dev, 500);
> > @@ -194,6 +195,7 @@ static int i2c_dw_pci_runtime_idle(struct device *dev)
> > return 0;
> > return -EBUSY;
> > }
> > +#endif
> >
> > static const struct dev_pm_ops i2c_dw_pm_ops = {
>
> Shouldn't this be using UNIVERSAL_DEV_PM_OPS with the suspend and resume
> function #ifdeffed by CONFIG_PM_SLEEP?
Yes, I think that would be better.
>
> > .resume = i2c_dw_pci_resume,
> > --
> > 1.8.4.rc3
> >
WARNING: multiple messages have this Message-ID (diff)
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: "Vincent Stehlé" <vincent.stehle@laposte.net>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c-designware: define i2c_dw_pci_runtime_idle only with runtime pm
Date: Fri, 27 Sep 2013 11:22:59 +0300 [thread overview]
Message-ID: <20130927082259.GC28875@intel.com> (raw)
In-Reply-To: <20130927024313.GB3159@katana>
On Fri, Sep 27, 2013 at 04:43:13AM +0200, Wolfram Sang wrote:
> On Fri, Sep 27, 2013 at 12:24:03AM +0200, Vincent Stehlé wrote:
> > Make sure i2c_dw_pci_runtime_idle() is defined only when actually used, when
> > CONFIG_PM_RUNTIME is defined.
> >
> > This fixes the following compilation warning:
> >
> > drivers/i2c/busses/i2c-designware-pcidrv.c:188:12: warning: ‘i2c_dw_pci_runtime_idle’ defined but not used [-Wunused-function]
> >
> > Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
> > Cc: Wolfram Sang <wsa@the-dreams.de>
>
> I wonder if this fix is complete? Mika?
>
> > ---
> > drivers/i2c/busses/i2c-designware-pcidrv.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > index f6ed06c..2b5d3a6 100644
> > --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> > +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > @@ -185,6 +185,7 @@ static int i2c_dw_pci_resume(struct device *dev)
> > return 0;
> > }
> >
> > +#ifdef CONFIG_PM_RUNTIME
> > static int i2c_dw_pci_runtime_idle(struct device *dev)
> > {
> > int err = pm_schedule_suspend(dev, 500);
> > @@ -194,6 +195,7 @@ static int i2c_dw_pci_runtime_idle(struct device *dev)
> > return 0;
> > return -EBUSY;
> > }
> > +#endif
> >
> > static const struct dev_pm_ops i2c_dw_pm_ops = {
>
> Shouldn't this be using UNIVERSAL_DEV_PM_OPS with the suspend and resume
> function #ifdeffed by CONFIG_PM_SLEEP?
Yes, I think that would be better.
>
> > .resume = i2c_dw_pci_resume,
> > --
> > 1.8.4.rc3
> >
next prev parent reply other threads:[~2013-09-27 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 22:24 [PATCH] i2c-designware: define i2c_dw_pci_runtime_idle only with runtime pm Vincent Stehlé
2013-09-26 22:24 ` Vincent Stehlé
[not found] ` <1380234243-23787-1-git-send-email-vincent.stehle-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
2013-09-27 2:43 ` Wolfram Sang
2013-09-27 2:43 ` Wolfram Sang
2013-09-27 8:22 ` Mika Westerberg [this message]
2013-09-27 8:22 ` 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=20130927082259.GC28875@intel.com \
--to=mika.westerberg-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vincent.stehle-QFKgK+z4sOrR7s880joybQ@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.