diff options
author | Gideon Israel Dsouza <gidisrael@gmail.com> | 2016-12-31 10:56:23 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-01-12 11:24:39 -0500 |
commit | d8c34b949d8c9f61e099e00f22770e400adf2b76 (patch) | |
tree | 748dafb61696c949ed7c885aef4eb68610f543b4 /crypto/ahash.c | |
parent | d2110224a66779fc2c833d2c16caa73e2e23591e (diff) |
crypto: Replaced gcc specific attributes with macros from compiler.h
Continuing from this commit: 52f5684c8e1e
("kernel: use macros from compiler.h instead of __attribute__((...))")
I submitted 4 total patches. They are part of task I've taken up to
increase compiler portability in the kernel. I've cleaned up the
subsystems under /kernel /mm /block and /security, this patch targets
/crypto.
There is <linux/compiler.h> which provides macros for various gcc specific
constructs. Eg: __weak for __attribute__((weak)). I've cleaned all
instances of gcc specific attributes with the right macros for the crypto
subsystem.
I had to make one additional change into compiler-gcc.h for the case when
one wants to use this: __attribute__((aligned) and not specify an alignment
factor. From the gcc docs, this will result in the largest alignment for
that data type on the target machine so I've named the macro
__aligned_largest. Please advise if another name is more appropriate.
Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r-- | crypto/ahash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c index 2ce8bcb9049c..e58c4970c22b 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/cryptouser.h> | 25 | #include <linux/cryptouser.h> |
26 | #include <linux/compiler.h> | ||
26 | #include <net/netlink.h> | 27 | #include <net/netlink.h> |
27 | 28 | ||
28 | #include "internal.h" | 29 | #include "internal.h" |
@@ -493,7 +494,7 @@ static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg) | |||
493 | #endif | 494 | #endif |
494 | 495 | ||
495 | static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg) | 496 | static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg) |
496 | __attribute__ ((unused)); | 497 | __maybe_unused; |
497 | static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg) | 498 | static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg) |
498 | { | 499 | { |
499 | seq_printf(m, "type : ahash\n"); | 500 | seq_printf(m, "type : ahash\n"); |