Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Michal Ludvig and committed by
Herbert Xu
58ec4152 5644bda5

+9 -9
+9 -9
drivers/crypto/padlock-sha.c
··· 262 262 263 263 static void __init padlock_sha_check_fallbacks(void) 264 264 { 265 - static struct crypto_tfm *tfm_sha1, *tfm_sha256; 265 + struct crypto_tfm *tfm; 266 266 267 267 /* We'll try to allocate one TFM for each fallback 268 268 * to test that the modules are available. */ 269 - tfm_sha1 = crypto_alloc_tfm(sha1_fallback, 0); 270 - if (!tfm_sha1) { 269 + tfm = crypto_alloc_tfm(sha1_fallback, 0); 270 + if (!tfm) { 271 271 printk(KERN_WARNING PFX "Couldn't load fallback module for '%s'. Tried '%s'.\n", 272 272 sha1_alg.cra_name, sha1_fallback); 273 273 } else { 274 274 printk(KERN_NOTICE PFX "Fallback for '%s' is driver '%s' (prio=%d)\n", sha1_alg.cra_name, 275 - crypto_tfm_alg_driver_name(tfm_sha1), crypto_tfm_alg_priority(tfm_sha1)); 276 - crypto_free_tfm(tfm_sha1); 275 + crypto_tfm_alg_driver_name(tfm), crypto_tfm_alg_priority(tfm)); 276 + crypto_free_tfm(tfm); 277 277 } 278 278 279 - tfm_sha256 = crypto_alloc_tfm(sha256_fallback, 0); 280 - if (!tfm_sha256) { 279 + tfm = crypto_alloc_tfm(sha256_fallback, 0); 280 + if (!tfm) { 281 281 printk(KERN_WARNING PFX "Couldn't load fallback module for '%s'. Tried '%s'.\n", 282 282 sha256_alg.cra_name, sha256_fallback); 283 283 } else { 284 284 printk(KERN_NOTICE PFX "Fallback for '%s' is driver '%s' (prio=%d)\n", sha256_alg.cra_name, 285 - crypto_tfm_alg_driver_name(tfm_sha256), crypto_tfm_alg_priority(tfm_sha256)); 286 - crypto_free_tfm(tfm_sha256); 285 + crypto_tfm_alg_driver_name(tfm), crypto_tfm_alg_priority(tfm)); 286 + crypto_free_tfm(tfm); 287 287 } 288 288 } 289 289