* [PATCH] scsi: core: ufs-pci: hide unused ufshcd_pci_restore function
@ 2021-10-19 15:35 Arnd Bergmann
2021-10-19 16:32 ` Bart Van Assche
2021-10-19 16:47 ` Adrian Hunter
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-10-19 15:35 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen, Adrian Hunter, Avri Altman
Cc: Arnd Bergmann, Alim Akhtar, Daejun Park, linux-scsi, linux-kernel
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
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: core: ufs-pci: hide unused ufshcd_pci_restore function
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
2021-10-19 16:47 ` Adrian Hunter
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2021-10-19 16:32 UTC (permalink / raw)
To: Arnd Bergmann, James E.J. Bottomley, Martin K. Petersen,
Adrian Hunter, Avri Altman
Cc: Arnd Bergmann, Alim Akhtar, Daejun Park, linux-scsi, linux-kernel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: core: ufs-pci: hide unused ufshcd_pci_restore function
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
@ 2021-10-19 16:47 ` Adrian Hunter
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2021-10-19 16:47 UTC (permalink / raw)
To: Arnd Bergmann, James E.J. Bottomley, Martin K. Petersen, Avri Altman
Cc: Arnd Bergmann, Alim Akhtar, Daejun Park, linux-scsi,
linux-kernel, Bart Van Assche
On 19/10/2021 18:35, 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>
There is a fixed version of "scsi: core: ufs-pci: Force a full restore after suspend-to-disk" here:
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git/commit/?h=5.15/scsi-fixes&id=4e5483b8440d01f6851a1388801088a6e0da0b56
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-19 16:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-10-19 16:47 ` Adrian Hunter
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).