public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] usb: host: xhci: Move suspend ops under PM_SLEEP to avoid warning
Date: Thu, 12 Dec 2013 21:01:04 -0500	[thread overview]
Message-ID: <52AA6A60.7050308@ti.com> (raw)
In-Reply-To: <20131213015133.GA29964@psi-dev26.jf.intel.com>

On Thursday 12 December 2013 08:51 PM, David Cohen wrote:
> On Thu, Dec 12, 2013 at 08:06:24PM -0500, Santosh Shilimkar wrote:
>> Otherwise you get below build warnings
>>
>> drivers/usb/host/xhci-plat.c:201:12: warning: ‘xhci_plat_suspend’ defined but not used [-Wunused-function]
>> drivers/usb/host/xhci-plat.c:209:12: warning: ‘xhci_plat_resume’ defined but not used [-Wunused-function]
>>
>> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>>  drivers/usb/host/xhci-plat.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
>> index d9c169f..4875be5 100644
>> --- a/drivers/usb/host/xhci-plat.c
>> +++ b/drivers/usb/host/xhci-plat.c
>> @@ -197,7 +197,7 @@ static int xhci_plat_remove(struct platform_device *dev)
>>  	return 0;
>>  }
>>  
>> -#ifdef CONFIG_PM
>> +#ifdef CONFIG_PM_SLEEP
> 
> Can't you just remove these #ifdefs altogether?
> xhci_plat_pm_ops is set using SET_SYSTEM_SLEEP_PM_OPS() macro which
> already handles '#ifdef CONFIG_PM_SLEEP' case.
> 
It does handle the difference but the hooks implemented would
show-up un-used warning if you remove the #ifdefs.

drivers/usb/host/xhci-plat.c:200:12: warning: ‘xhci_plat_suspend’ defined but not used [-Wunused-function]
drivers/usb/host/xhci-plat.c:208:12: warning: ‘xhci_plat_resume’ defined but not used [-Wunused-function]

So you need to wrap them under the PM_SLEEP check.

Regards,
Santosh


  reply	other threads:[~2013-12-13  2:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13  1:06 [PATCH] usb: host: xhci: Move suspend ops under PM_SLEEP to avoid warning Santosh Shilimkar
2013-12-13  1:51 ` David Cohen
2013-12-13  2:01   ` Santosh Shilimkar [this message]
2013-12-13  3:25     ` David Cohen
2013-12-13  5:23       ` David Cohen
2013-12-13 22:55         ` Santosh Shilimkar
2013-12-14  1:16           ` David Cohen

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=52AA6A60.7050308@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sarah.a.sharp@linux.intel.com \
    /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