All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto/morus(640,1280) - make crypto_...-algs static
@ 2018-09-26 22:49 valdis.kletnieks
  2018-09-27 19:28 ` Ondrej Mosnáček
  2018-10-05  2:29 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: valdis.kletnieks @ 2018-09-26 22:49 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller; +Cc: linux-crypto, linux-kernel

sparse complains thusly:

  CHECK   arch/x86/crypto/morus640-sse2-glue.c
arch/x86/crypto/morus640-sse2-glue.c:38:1: warning: symbol 'crypto_morus640_sse2_algs' was not declared. Should it be static?
  CHECK   arch/x86/crypto/morus1280-sse2-glue.c
arch/x86/crypto/morus1280-sse2-glue.c:38:1: warning: symbol 'crypto_morus1280_sse2_algs' was not declared. Should it be static?
  CHECK   arch/x86/crypto/morus1280-avx2-glue.c
arch/x86/crypto/morus1280-avx2-glue.c:38:1: warning: symbol 'crypto_morus1280_avx2_algs' was not declared. Should it be static?

and sparse is correct - these don't need to be global and polluting the namespace.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
---
diff --git a/include/crypto/morus1280_glue.h b/include/crypto/morus1280_glue.h
index b26dd70efd9a..ba782e10065e 100644
--- a/include/crypto/morus1280_glue.h
+++ b/include/crypto/morus1280_glue.h
@@ -82,7 +82,7 @@ void cryptd_morus1280_glue_exit_tfm(struct crypto_aead *aead);
 	{ \
 	} \
 	\
-	struct aead_alg crypto_morus1280_##id##_algs[] = {\
+	static struct aead_alg crypto_morus1280_##id##_algs[] = {\
 		{ \
 			.setkey = crypto_morus1280_glue_setkey, \
 			.setauthsize = crypto_morus1280_glue_setauthsize, \
diff --git a/include/crypto/morus640_glue.h b/include/crypto/morus640_glue.h
index 90c8db07e740..27fa790a2362 100644
--- a/include/crypto/morus640_glue.h
+++ b/include/crypto/morus640_glue.h
@@ -82,7 +82,7 @@ void cryptd_morus640_glue_exit_tfm(struct crypto_aead *aead);
 	{ \
 	} \
 	\
-	struct aead_alg crypto_morus640_##id##_algs[] = {\
+	static struct aead_alg crypto_morus640_##id##_algs[] = {\
 		{ \
 			.setkey = crypto_morus640_glue_setkey, \
 			.setauthsize = crypto_morus640_glue_setauthsize, \

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto/morus(640,1280) - make crypto_...-algs static
  2018-09-26 22:49 [PATCH] crypto/morus(640,1280) - make crypto_...-algs static valdis.kletnieks
@ 2018-09-27 19:28 ` Ondrej Mosnáček
  2018-10-05  2:29 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Ondrej Mosnáček @ 2018-09-27 19:28 UTC (permalink / raw)
  To: valdis.kletnieks
  Cc: Herbert Xu, David S. Miller, linux-crypto, Linux Kernel Mailing List

št 27. 9. 2018 o 0:50 <valdis.kletnieks@vt.edu> napísal(a):
> sparse complains thusly:
>
>   CHECK   arch/x86/crypto/morus640-sse2-glue.c
> arch/x86/crypto/morus640-sse2-glue.c:38:1: warning: symbol 'crypto_morus640_sse2_algs' was not declared. Should it be static?
>   CHECK   arch/x86/crypto/morus1280-sse2-glue.c
> arch/x86/crypto/morus1280-sse2-glue.c:38:1: warning: symbol 'crypto_morus1280_sse2_algs' was not declared. Should it be static?
>   CHECK   arch/x86/crypto/morus1280-avx2-glue.c
> arch/x86/crypto/morus1280-avx2-glue.c:38:1: warning: symbol 'crypto_morus1280_avx2_algs' was not declared. Should it be static?
>
> and sparse is correct - these don't need to be global and polluting the namespace.
>
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>

Indeed, this should be fixed, thanks!

Acked-by: Ondrej Mosnacek <omosnacek@gmail.com>

> ---
> diff --git a/include/crypto/morus1280_glue.h b/include/crypto/morus1280_glue.h
> index b26dd70efd9a..ba782e10065e 100644
> --- a/include/crypto/morus1280_glue.h
> +++ b/include/crypto/morus1280_glue.h
> @@ -82,7 +82,7 @@ void cryptd_morus1280_glue_exit_tfm(struct crypto_aead *aead);
>         { \
>         } \
>         \
> -       struct aead_alg crypto_morus1280_##id##_algs[] = {\
> +       static struct aead_alg crypto_morus1280_##id##_algs[] = {\
>                 { \
>                         .setkey = crypto_morus1280_glue_setkey, \
>                         .setauthsize = crypto_morus1280_glue_setauthsize, \
> diff --git a/include/crypto/morus640_glue.h b/include/crypto/morus640_glue.h
> index 90c8db07e740..27fa790a2362 100644
> --- a/include/crypto/morus640_glue.h
> +++ b/include/crypto/morus640_glue.h
> @@ -82,7 +82,7 @@ void cryptd_morus640_glue_exit_tfm(struct crypto_aead *aead);
>         { \
>         } \
>         \
> -       struct aead_alg crypto_morus640_##id##_algs[] = {\
> +       static struct aead_alg crypto_morus640_##id##_algs[] = {\
>                 { \
>                         .setkey = crypto_morus640_glue_setkey, \
>                         .setauthsize = crypto_morus640_glue_setauthsize, \
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto/morus(640,1280) - make crypto_...-algs static
  2018-09-26 22:49 [PATCH] crypto/morus(640,1280) - make crypto_...-algs static valdis.kletnieks
  2018-09-27 19:28 ` Ondrej Mosnáček
@ 2018-10-05  2:29 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2018-10-05  2:29 UTC (permalink / raw)
  To: valdis.kletnieks; +Cc: David S. Miller, linux-crypto, linux-kernel

On Wed, Sep 26, 2018 at 06:49:38PM -0400, valdis.kletnieks@vt.edu wrote:
> sparse complains thusly:
> 
>   CHECK   arch/x86/crypto/morus640-sse2-glue.c
> arch/x86/crypto/morus640-sse2-glue.c:38:1: warning: symbol 'crypto_morus640_sse2_algs' was not declared. Should it be static?
>   CHECK   arch/x86/crypto/morus1280-sse2-glue.c
> arch/x86/crypto/morus1280-sse2-glue.c:38:1: warning: symbol 'crypto_morus1280_sse2_algs' was not declared. Should it be static?
>   CHECK   arch/x86/crypto/morus1280-avx2-glue.c
> arch/x86/crypto/morus1280-avx2-glue.c:38:1: warning: symbol 'crypto_morus1280_avx2_algs' was not declared. Should it be static?
> 
> and sparse is correct - these don't need to be global and polluting the namespace.
> 
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-05  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 22:49 [PATCH] crypto/morus(640,1280) - make crypto_...-algs static valdis.kletnieks
2018-09-27 19:28 ` Ondrej Mosnáček
2018-10-05  2:29 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.