aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Ludvig <michal@logix.cz>2006-07-17 08:14:58 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 11:41:00 +1000
commit58ec4152895b96f047dcf5e490ee49b4c574dec3 (patch)
tree2cc6316aaf70ffd7c43ae9677f0ba35903b9de9d
parent5644bda5d6aa17a70b8842eb56365d501a5da159 (diff)
[CRYPTO] padlock-sha: TFMs don't need to be static
TFMs are local variables. No need to declare them static. After all one is enough. Signed-off-by: Michal Ludvig <michal@logix.cz> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/padlock-sha.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
index 95e9971d1a7..b028db61c30 100644
--- a/drivers/crypto/padlock-sha.c
+++ b/drivers/crypto/padlock-sha.c
@@ -262,28 +262,28 @@ static struct crypto_alg sha256_alg = {
static void __init padlock_sha_check_fallbacks(void)
{
- static struct crypto_tfm *tfm_sha1, *tfm_sha256;
+ struct crypto_tfm *tfm;
/* We'll try to allocate one TFM for each fallback
* to test that the modules are available. */
- tfm_sha1 = crypto_alloc_tfm(sha1_fallback, 0);
- if (!tfm_sha1) {
+ tfm = crypto_alloc_tfm(sha1_fallback, 0);
+ if (!tfm) {
printk(KERN_WARNING PFX "Couldn't load fallback module for '%s'. Tried '%s'.\n",
sha1_alg.cra_name, sha1_fallback);
} else {
printk(KERN_NOTICE PFX "Fallback for '%s' is driver '%s' (prio=%d)\n", sha1_alg.cra_name,
- crypto_tfm_alg_driver_name(tfm_sha1), crypto_tfm_alg_priority(tfm_sha1));
- crypto_free_tfm(tfm_sha1);
+ crypto_tfm_alg_driver_name(tfm), crypto_tfm_alg_priority(tfm));
+ crypto_free_tfm(tfm);
}
- tfm_sha256 = crypto_alloc_tfm(sha256_fallback, 0);
- if (!tfm_sha256) {
+ tfm = crypto_alloc_tfm(sha256_fallback, 0);
+ if (!tfm) {
printk(KERN_WARNING PFX "Couldn't load fallback module for '%s'. Tried '%s'.\n",
sha256_alg.cra_name, sha256_fallback);
} else {
printk(KERN_NOTICE PFX "Fallback for '%s' is driver '%s' (prio=%d)\n", sha256_alg.cra_name,
- crypto_tfm_alg_driver_name(tfm_sha256), crypto_tfm_alg_priority(tfm_sha256));
- crypto_free_tfm(tfm_sha256);
+ crypto_tfm_alg_driver_name(tfm), crypto_tfm_alg_priority(tfm));
+ crypto_free_tfm(tfm);
}
}