aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJames Morris <jmorris@intercode.com.au>2002-11-01 10:05:16 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2002-11-01 10:05:16 -0800
commit95d6c2106d03ca0656b1feab7acfd3744eb558c0 (patch)
tree586814012dc75c7ec11bf3471c877c9ae5948d41 /crypto
parent0a8693f91e4bc7df5e6e788a904f3afc0fc14e70 (diff)
downloadhistory-95d6c2106d03ca0656b1feab7acfd3744eb558c0.tar.gz
[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().
Diffstat (limited to 'crypto')
-rw-r--r--crypto/api.c3
-rw-r--r--crypto/internal.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 51cd1a8113dcb5..5a29cb8c93f693 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -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;
}
diff --git a/crypto/internal.h b/crypto/internal.h
index c1904830595049..204a3b18ccc8ce 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -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);
}