public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Arnd Bergmann <arnd@kernel.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Avri Altman <avri.altman@wdc.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Daejun Park <daejun7.park@samsung.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: core: ufs-pci: hide unused ufshcd_pci_restore function
Date: Tue, 19 Oct 2021 09:32:13 -0700	[thread overview]
Message-ID: <dedd8a18-c6e2-c60d-96a3-fb8a61e3b14e@acm.org> (raw)
In-Reply-To: <20211019153600.380220-1-arnd@kernel.org>

On 10/19/21 8:35 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When CONFIG_PM_SLEEP is disabled, ufshcd_pci_restore() fails
> to compile but is also unused:
> 
> drivers/scsi/ufs/ufshcd-pci.c: In function 'ufshcd_pci_restore':
> drivers/scsi/ufs/ufshcd-pci.c:459:16: error: implicit declaration of function 'ufshcd_system_resume'; did you mean 'ufshcd_runtime_resume'? [-Werror=implicit-function-declaration]
>    459 |         return ufshcd_system_resume(dev);
>        |                ^~~~~~~~~~~~~~~~~~~~
>        |                ufshcd_runtime_resume
> At top level:
> drivers/scsi/ufs/ufshcd-pci.c:452:12: error: 'ufshcd_pci_restore' defined but not used [-Werror=unused-function]
>    452 | static int ufshcd_pci_restore(struct device *dev)
>        |            ^~~~~~~~~~~~~~~~~~
> 
> Enclose it within the same #ifdef as the related code.
> 
> Fixes: 21431d5bdf15 ("scsi: core: ufs-pci: Force a full restore after suspend-to-disk")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/scsi/ufs/ufshcd-pci.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c
> index d65e6cd7a28d..51424557810d 100644
> --- a/drivers/scsi/ufs/ufshcd-pci.c
> +++ b/drivers/scsi/ufs/ufshcd-pci.c
> @@ -449,6 +449,7 @@ static struct ufs_hba_variant_ops ufs_intel_lkf_hba_vops = {
>   	.device_reset		= ufs_intel_device_reset,
>   };
>   
> +#ifdef CONFIG_PM_SLEEP
>   static int ufshcd_pci_restore(struct device *dev)
>   {
>   	struct ufs_hba *hba = dev_get_drvdata(dev);
> @@ -458,6 +459,7 @@ static int ufshcd_pci_restore(struct device *dev)
>   
>   	return ufshcd_system_resume(dev);
>   }
> +#endif
>   
>   /**
>    * ufshcd_pci_shutdown - main function to put the controller in reset state
> 

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

  reply	other threads:[~2021-10-19 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 15:35 [PATCH] scsi: core: ufs-pci: hide unused ufshcd_pci_restore function Arnd Bergmann
2021-10-19 16:32 ` Bart Van Assche [this message]
2021-10-19 16:47 ` Adrian Hunter

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=dedd8a18-c6e2-c60d-96a3-fb8a61e3b14e@acm.org \
    --to=bvanassche@acm.org \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=avri.altman@wdc.com \
    --cc=daejun7.park@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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