Merge tag 'mfd-for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
[firefly-linux-kernel-4.4.55.git] / crypto / shash.c
index 929058a68561264c389719e26a3d22704bbbe18e..ecb1e3d39bf0776a0d8805a9f8fadd3ec288bcb0 100644 (file)
@@ -67,7 +67,8 @@ EXPORT_SYMBOL_GPL(crypto_shash_setkey);
 static inline unsigned int shash_align_buffer_size(unsigned len,
                                                   unsigned long mask)
 {
-       return len + (mask & ~(__alignof__(u8 __attribute__ ((aligned))) - 1));
+       typedef u8 __attribute__ ((aligned)) u8_aligned;
+       return len + (mask & ~(__alignof__(u8_aligned) - 1));
 }
 
 static int shash_update_unaligned(struct shash_desc *desc, const u8 *data,
@@ -519,11 +520,6 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm)
        return 0;
 }
 
-static unsigned int crypto_shash_extsize(struct crypto_alg *alg)
-{
-       return alg->cra_ctxsize;
-}
-
 #ifdef CONFIG_NET
 static int crypto_shash_report(struct sk_buff *skb, struct crypto_alg *alg)
 {
@@ -563,7 +559,7 @@ static void crypto_shash_show(struct seq_file *m, struct crypto_alg *alg)
 
 static const struct crypto_type crypto_shash_type = {
        .ctxsize = crypto_shash_ctxsize,
-       .extsize = crypto_shash_extsize,
+       .extsize = crypto_alg_extsize,
        .init = crypto_init_shash_ops,
        .init_tfm = crypto_shash_init_tfm,
 #ifdef CONFIG_PROC_FS