2019-06-26 02:11:30

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] nvme-pci: Make nvme_dev_pm_ops static

Fix sparse warning:

drivers/nvme/host/pci.c:2926:25: warning:
symbol 'nvme_dev_pm_ops' was not declared. Should it be static?

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
drivers/nvme/host/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 1893520..f500133 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2923,7 +2923,7 @@ static int nvme_simple_resume(struct device *dev)
return 0;
}

-const struct dev_pm_ops nvme_dev_pm_ops = {
+static const struct dev_pm_ops nvme_dev_pm_ops = {
.suspend = nvme_suspend,
.resume = nvme_resume,
.freeze = nvme_simple_suspend,
--
2.7.4



2019-06-26 20:23:46

by Minwoo Im

[permalink] [raw]
Subject: Re: [PATCH -next] nvme-pci: Make nvme_dev_pm_ops static

On 19-06-26 10:09:02, YueHaibing wrote:
> Fix sparse warning:
>
> drivers/nvme/host/pci.c:2926:25: warning:
> symbol 'nvme_dev_pm_ops' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>
> ---
> drivers/nvme/host/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 1893520..f500133 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2923,7 +2923,7 @@ static int nvme_simple_resume(struct device *dev)
> return 0;
> }
>
> -const struct dev_pm_ops nvme_dev_pm_ops = {
> +static const struct dev_pm_ops nvme_dev_pm_ops = {
> .suspend = nvme_suspend,
> .resume = nvme_resume,
> .freeze = nvme_simple_suspend,

IMHO, it should be in static.

Reviewed-by: Minwoo Im <[email protected]>

2019-06-27 00:04:44

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH -next] nvme-pci: Make nvme_dev_pm_ops static

Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>

On 6/26/19, 1:23 PM, "Linux-nvme on behalf of Minwoo Im" <[email protected] on behalf of [email protected]> wrote:

On 19-06-26 10:09:02, YueHaibing wrote:
> Fix sparse warning:
>
> drivers/nvme/host/pci.c:2926:25: warning:
> symbol 'nvme_dev_pm_ops' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>
> ---
> drivers/nvme/host/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 1893520..f500133 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2923,7 +2923,7 @@ static int nvme_simple_resume(struct device *dev)
> return 0;
> }
>
> -const struct dev_pm_ops nvme_dev_pm_ops = {
> +static const struct dev_pm_ops nvme_dev_pm_ops = {
> .suspend = nvme_suspend,
> .resume = nvme_resume,
> .freeze = nvme_simple_suspend,

IMHO, it should be in static.

Reviewed-by: Minwoo Im <[email protected]>

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme


2019-06-28 07:09:32

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH -next] nvme-pci: Make nvme_dev_pm_ops static

Thanks,

applied to nvme-5.3.