Skip to content

Commit

Permalink
[CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long
Browse files Browse the repository at this point in the history
Thanks to David Miller for pointing out that the SLAB (or SLOB/SLUB)
cache uses the alignment of unsigned long long if the architecture
kmalloc/slab alignment macros are not defined.

This patch changes the CRYPTO_MINALIGN so that it uses the same default
value.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Jan 10, 2008
1 parent 38ed9ab commit 6eb7228
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/linux/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,11 @@
#define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN
#elif defined(ARCH_SLAB_MINALIGN)
#define CRYPTO_MINALIGN ARCH_SLAB_MINALIGN
#else
#define CRYPTO_MINALIGN __alignof__(unsigned long long)
#endif

#ifdef CRYPTO_MINALIGN
#define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN)))
#else
#define CRYPTO_MINALIGN_ATTR
#endif

struct scatterlist;
struct crypto_ablkcipher;
Expand Down

0 comments on commit 6eb7228

Please sign in to comment.