linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions
@ 2014-04-16 16:19 Jianyu Zhan
  2014-04-17 15:28 ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Jianyu Zhan @ 2014-04-16 16:19 UTC (permalink / raw)
  To: herbert, davem, tglx, mingo, hpa
  Cc: x86, linux-crypto, linux-kernel, nasa4836

Commit 128ea04a9885("lto: Make asmlinkage __visible") restricts
asmlinkage to externally_visible, this causes compilation warnings:

    arch/x86/crypto/sha256_ssse3_glue.c:56:1:
    warning: ‘externally_visible’ attribute have effect only on public objects [-Wattributes]

    static asmlinkage void (*sha256_transform_asm)(const char *, u32 *, u64);
    ^

    arch/x86/crypto/sha512_ssse3_glue.c:55:1:
    warning: ‘externally_visible’ attribute have effect only on public objects [-Wattributes]
    static asmlinkage void (*sha512_transform_asm)(const char *, u64 *,
    ^

Drop asmlinkage here to avoid such warnings.

Also see Commit 8783dd3a37a5853689e1("irqchip: Remove asmlinkage from static functions")

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
---
 arch/x86/crypto/sha256_ssse3_glue.c | 2 +-
 arch/x86/crypto/sha512_ssse3_glue.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c
index f248546..be35c31 100644
--- a/arch/x86/crypto/sha256_ssse3_glue.c
+++ b/arch/x86/crypto/sha256_ssse3_glue.c
@@ -53,7 +53,7 @@ asmlinkage void sha256_transform_rorx(const char *data, u32 *digest,
 				     u64 rounds);
 #endif
 
-static asmlinkage void (*sha256_transform_asm)(const char *, u32 *, u64);
+static void (*sha256_transform_asm)(const char *, u32 *, u64);
 
 
 static int sha256_ssse3_init(struct shash_desc *desc)
diff --git a/arch/x86/crypto/sha512_ssse3_glue.c b/arch/x86/crypto/sha512_ssse3_glue.c
index f30cd10..ddbc242 100644
--- a/arch/x86/crypto/sha512_ssse3_glue.c
+++ b/arch/x86/crypto/sha512_ssse3_glue.c
@@ -52,7 +52,7 @@ asmlinkage void sha512_transform_rorx(const char *data, u64 *digest,
 				     u64 rounds);
 #endif
 
-static asmlinkage void (*sha512_transform_asm)(const char *, u64 *, u64);
+static void (*sha512_transform_asm)(const char *, u64 *, u64);
 
 
 static int sha512_ssse3_init(struct shash_desc *desc)
-- 
1.9.0.GIT

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

* Re: [PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions
  2014-04-16 16:19 [PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions Jianyu Zhan
@ 2014-04-17 15:28 ` Marek Vasut
  2014-04-18  4:49   ` H. Peter Anvin
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2014-04-17 15:28 UTC (permalink / raw)
  To: Jianyu Zhan
  Cc: herbert, davem, tglx, mingo, hpa, x86, linux-crypto, linux-kernel

On Wednesday, April 16, 2014 at 06:19:50 PM, Jianyu Zhan wrote:
> Commit 128ea04a9885("lto: Make asmlinkage __visible") restricts
> asmlinkage to externally_visible, this causes compilation warnings:
> 
>     arch/x86/crypto/sha256_ssse3_glue.c:56:1:
>     warning: ‘externally_visible’ attribute have effect only on public
> objects [-Wattributes]
> 
>     static asmlinkage void (*sha256_transform_asm)(const char *, u32 *,
> u64); ^
> 
>     arch/x86/crypto/sha512_ssse3_glue.c:55:1:
>     warning: ‘externally_visible’ attribute have effect only on public
> objects [-Wattributes] static asmlinkage void
> (*sha512_transform_asm)(const char *, u64 *, ^
> 
> Drop asmlinkage here to avoid such warnings.
> 
> Also see Commit 8783dd3a37a5853689e1("irqchip: Remove asmlinkage from
> static functions")
> 
> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>

Makes sense, please add my humble

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

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

* Re: [PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions
  2014-04-17 15:28 ` Marek Vasut
@ 2014-04-18  4:49   ` H. Peter Anvin
  2014-04-18  4:58     ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2014-04-18  4:49 UTC (permalink / raw)
  To: Marek Vasut, Jianyu Zhan
  Cc: herbert, davem, tglx, mingo, x86, linux-crypto, linux-kernel

On 04/17/2014 08:28 AM, Marek Vasut wrote:
> On Wednesday, April 16, 2014 at 06:19:50 PM, Jianyu Zhan wrote:
>> Commit 128ea04a9885("lto: Make asmlinkage __visible") restricts
>> asmlinkage to externally_visible, this causes compilation warnings:
>>
>>     arch/x86/crypto/sha256_ssse3_glue.c:56:1:
>>     warning: ‘externally_visible’ attribute have effect only on public
>> objects [-Wattributes]
>>
>>     static asmlinkage void (*sha256_transform_asm)(const char *, u32 *,
>> u64); ^
>>
>>     arch/x86/crypto/sha512_ssse3_glue.c:55:1:
>>     warning: ‘externally_visible’ attribute have effect only on public
>> objects [-Wattributes] static asmlinkage void
>> (*sha512_transform_asm)(const char *, u64 *, ^
>>
>> Drop asmlinkage here to avoid such warnings.
>>
>> Also see Commit 8783dd3a37a5853689e1("irqchip: Remove asmlinkage from
>> static functions")
>>
>> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
> 
> Makes sense, please add my humble
> 
> Reviewed-by: Marek Vasut <marex@denx.de>
> 

It doesn't make sense, sorry.  The right thing to drop here is not
"asmlinkage", it is "static": this is an external declaration.

	-hpa

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

* Re: [PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions
  2014-04-18  4:49   ` H. Peter Anvin
@ 2014-04-18  4:58     ` Herbert Xu
  2014-04-18  5:01       ` H. Peter Anvin
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2014-04-18  4:58 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Marek Vasut, Jianyu Zhan, davem, tglx, mingo, x86, linux-crypto,
	linux-kernel

On Thu, Apr 17, 2014 at 09:49:56PM -0700, H. Peter Anvin wrote:
> On 04/17/2014 08:28 AM, Marek Vasut wrote:
> > On Wednesday, April 16, 2014 at 06:19:50 PM, Jianyu Zhan wrote:
> >> Commit 128ea04a9885("lto: Make asmlinkage __visible") restricts
> >> asmlinkage to externally_visible, this causes compilation warnings:
> >>
> >>     arch/x86/crypto/sha256_ssse3_glue.c:56:1:
> >>     warning: ‘externally_visible’ attribute have effect only on public
> >> objects [-Wattributes]
> >>
> >>     static asmlinkage void (*sha256_transform_asm)(const char *, u32 *,
> >> u64); ^
> >>
> >>     arch/x86/crypto/sha512_ssse3_glue.c:55:1:
> >>     warning: ‘externally_visible’ attribute have effect only on public
> >> objects [-Wattributes] static asmlinkage void
> >> (*sha512_transform_asm)(const char *, u64 *, ^
> >>
> >> Drop asmlinkage here to avoid such warnings.
> >>
> >> Also see Commit 8783dd3a37a5853689e1("irqchip: Remove asmlinkage from
> >> static functions")
> >>
> >> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
> > 
> > Makes sense, please add my humble
> > 
> > Reviewed-by: Marek Vasut <marex@denx.de>
> > 
> 
> It doesn't make sense, sorry.  The right thing to drop here is not
> "asmlinkage", it is "static": this is an external declaration.

It's a function pointer that's static, not the function that
it's pointing to.

Cheers,
-- 
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] 5+ messages in thread

* Re: [PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions
  2014-04-18  4:58     ` Herbert Xu
@ 2014-04-18  5:01       ` H. Peter Anvin
  0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2014-04-18  5:01 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Marek Vasut, Jianyu Zhan, davem, tglx, mingo, x86, linux-crypto,
	linux-kernel

On 04/17/2014 09:58 PM, Herbert Xu wrote:
>>
>> It doesn't make sense, sorry.  The right thing to drop here is not
>> "asmlinkage", it is "static": this is an external declaration.
> 
> It's a function pointer that's static, not the function that
> it's pointing to.
> 

{facepalm} Right, function *pointer*.

Duh.

	-hpa

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

end of thread, other threads:[~2014-04-18  5:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 16:19 [PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions Jianyu Zhan
2014-04-17 15:28 ` Marek Vasut
2014-04-18  4:49   ` H. Peter Anvin
2014-04-18  4:58     ` Herbert Xu
2014-04-18  5:01       ` H. Peter Anvin

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).