Commit 95d6c210 authored by James Morris's avatar James Morris Committed by David S. Miller

[CRYPTO]: Cleanups based upon feedback from jgarzik.

- make crypto_cipher_flags() return u32 (this means it will return
  the actual flags reliably, instead of being just a boolean op).
- simplify error path in crypto_init_flags().
parent 0a8693f9
......@@ -67,9 +67,10 @@ static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags)
return crypto_init_compress_flags(tfm, flags);
default:
BUG();
break;
}
BUG();
return -EINVAL;
}
......
......@@ -35,7 +35,7 @@ static inline void crypto_yield(struct crypto_tfm *tfm)
cond_resched();
}
static inline int crypto_cipher_flags(u32 flags)
static inline u32 crypto_cipher_flags(u32 flags)
{
return flags & (CRYPTO_TFM_MODE_MASK|CRYPTO_TFM_REQ_WEAK_KEY);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment