]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - crypto/shash.c
crypto: Replaced gcc specific attributes with macros from compiler.h
authorGideon Israel Dsouza <gidisrael@gmail.com>
Sat, 31 Dec 2016 15:56:23 +0000 (21:26 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Jan 2017 16:24:39 +0000 (00:24 +0800)
commitd8c34b949d8c9f61e099e00f22770e400adf2b76
tree748dafb61696c949ed7c885aef4eb68610f543b4
parentd2110224a66779fc2c833d2c16caa73e2e23591e
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>
14 files changed:
crypto/ablkcipher.c
crypto/acompress.c
crypto/aead.c
crypto/ahash.c
crypto/akcipher.c
crypto/blkcipher.c
crypto/cts.c
crypto/kpp.c
crypto/pcbc.c
crypto/rng.c
crypto/scompress.c
crypto/shash.c
crypto/skcipher.c
include/linux/compiler-gcc.h