Skip to contentSkip to conversation

crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions

PATCH In review Jianyu Zhan 4 participants 5 messages Apr 16, 2014 – Apr 18, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions

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

---
 arch/x86/crypto/sha256_ssse3_glue.c | 2 +-
 arch/x86/crypto/sha512_ssse3_glue.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/crypto/sha256_ssse3_glue.c +1 -1
index f248546..be35c31 100644
@@ -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)
arch/x86/crypto/sha512_ssse3_glue.c +1 -1
index f30cd10..ddbc242 100644
@@ -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)
Signature · 1 line
1.9.0.GIT
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Jianyu Zhan

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 *, ^

Quoted 6 lines

Drop asmlinkage here to avoid such warnings.

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

Makes sense, please add my humble

Best regards,
Marek Vasut

#2 lore raw
Quoted 18 lines · Marek Vasut
Quoted 17 lines · Jianyu Zhan

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.

Quoted 9 lines
Quoted 4 lines

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

Makes sense, please add my humble

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

-hpa

maintainer
#3 lore raw
Quoted 24 lines · H. Peter Anvin
Quoted 23 lines · Marek Vasut
Quoted 21 lines · Jianyu Zhan

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

Quoted 7 lines
Quoted 4 lines

Makes sense, please add my humble

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,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#4 lore raw
Quoted 7 lines · Herbert Xu
Quoted 3 lines

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