2015-01-14 01:15:16

by weiyj_lk

[permalink] [raw]
Subject: [PATCH -next] crypto: algif_rng - fix sparse non static symbol warning

From: Wei Yongjun <[email protected]>

Fixes the following sparse warnings:

crypto/algif_rng.c:185:13: warning:
symbol 'rng_exit' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <[email protected]>
---
crypto/algif_rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c
index 91c06f5..67f612c 100644
--- a/crypto/algif_rng.c
+++ b/crypto/algif_rng.c
@@ -182,7 +182,7 @@ static int __init rng_init(void)
return af_alg_register_type(&algif_type_rng);
}

-void __exit rng_exit(void)
+static void __exit rng_exit(void)
{
int err = af_alg_unregister_type(&algif_type_rng);
BUG_ON(err);


2015-01-14 03:11:28

by Stephan Müller

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: algif_rng - fix sparse non static symbol warning

Am Mittwoch, 14. Januar 2015, 09:14:41 schrieb [email protected]:

Hi,

> From: Wei Yongjun <[email protected]>
>
> Fixes the following sparse warnings:
>
> crypto/algif_rng.c:185:13: warning:
> symbol 'rng_exit' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <[email protected]>

Acked-by: Stephan Mueller <[email protected]>
> ---
> crypto/algif_rng.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c
> index 91c06f5..67f612c 100644
> --- a/crypto/algif_rng.c
> +++ b/crypto/algif_rng.c
> @@ -182,7 +182,7 @@ static int __init rng_init(void)
> return af_alg_register_type(&algif_type_rng);
> }
>
> -void __exit rng_exit(void)
> +static void __exit rng_exit(void)
> {
> int err = af_alg_unregister_type(&algif_type_rng);
> BUG_ON(err);


--
Ciao
Stephan

2015-01-14 09:44:21

by Neil Horman

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: algif_rng - fix sparse non static symbol warning

On Wed, Jan 14, 2015 at 09:14:41AM +0800, [email protected] wrote:
> From: Wei Yongjun <[email protected]>
>
> Fixes the following sparse warnings:
>
> crypto/algif_rng.c:185:13: warning:
> symbol 'rng_exit' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Neil Horman <[email protected]>

> ---
> crypto/algif_rng.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c
> index 91c06f5..67f612c 100644
> --- a/crypto/algif_rng.c
> +++ b/crypto/algif_rng.c
> @@ -182,7 +182,7 @@ static int __init rng_init(void)
> return af_alg_register_type(&algif_type_rng);
> }
>
> -void __exit rng_exit(void)
> +static void __exit rng_exit(void)
> {
> int err = af_alg_unregister_type(&algif_type_rng);
> BUG_ON(err);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

2015-01-14 11:00:54

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: algif_rng - fix sparse non static symbol warning

On Wed, Jan 14, 2015 at 09:14:41AM +0800, [email protected] wrote:
> From: Wei Yongjun <[email protected]>
>
> Fixes the following sparse warnings:
>
> crypto/algif_rng.c:185:13: warning:
> symbol 'rng_exit' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <[email protected]>

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