2020-04-23 02:17:20

by Zou Wei

[permalink] [raw]
Subject: [PATCH -next] crypto: hisilicon/qm - Make qm_controller_reset() static

Fix the following sparse warning:

drivers/crypto/hisilicon/qm.c:3079:5: warning: symbol 'qm_controller_reset'
was not declared. Should it be static?

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
---
drivers/crypto/hisilicon/qm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 80c5525..69d02cb 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -3076,7 +3076,7 @@ static int qm_controller_reset_done(struct hisi_qm *qm)
return 0;
}

-int qm_controller_reset(struct hisi_qm *qm)
+static int qm_controller_reset(struct hisi_qm *qm)
{
struct pci_dev *pdev = qm->pdev;
int ret;
--
2.6.2


2020-04-23 02:32:06

by Zhou Wang

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: hisilicon/qm - Make qm_controller_reset() static

On 2020/4/23 10:22, Zou Wei wrote:
> Fix the following sparse warning:
>
> drivers/crypto/hisilicon/qm.c:3079:5: warning: symbol 'qm_controller_reset'
> was not declared. Should it be static?

It should be static.

>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>

Reviewed-by: Zhou Wang <[email protected]>

Thanks,
Zhou

> ---
> drivers/crypto/hisilicon/qm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
> index 80c5525..69d02cb 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -3076,7 +3076,7 @@ static int qm_controller_reset_done(struct hisi_qm *qm)
> return 0;
> }
>
> -int qm_controller_reset(struct hisi_qm *qm)
> +static int qm_controller_reset(struct hisi_qm *qm)
> {
> struct pci_dev *pdev = qm->pdev;
> int ret;
>

2020-04-30 05:34:12

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: hisilicon/qm - Make qm_controller_reset() static

On Thu, Apr 23, 2020 at 10:22:36AM +0800, Zou Wei wrote:
> Fix the following sparse warning:
>
> drivers/crypto/hisilicon/qm.c:3079:5: warning: symbol 'qm_controller_reset'
> was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>
> ---
> drivers/crypto/hisilicon/qm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt