Skip to contentSkip to conversation

Make loading padlock modules quieter when hardware isn't available

PATCH In review Jeremy Katz 2 participants 2 messages Jul 1, 2008 – Jul 3, 2008 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make loading padlock modules quieter when hardware isn't available

When loading aes or sha256 via the module aliases, the padlock modules also try to get loaded. Make the error message for them not being present only be a NOTICE rather than an ERROR so that use of 'quiet' will suppress the messages

---
 drivers/crypto/padlock-aes.c |    4 ++--
 drivers/crypto/padlock-sha.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/padlock-aes.c +2 -2
index bb30eb9..54a2a16 100644
@@ -385,12 +385,12 @@ static int __init padlock_init(void)
 	int ret;
 
 	if (!cpu_has_xcrypt) {
-		printk(KERN_ERR PFX "VIA PadLock not detected.\n");
+		printk(KERN_NOTICE PFX "VIA PadLock not detected.\n");
 		return -ENODEV;
 	}
 
 	if (!cpu_has_xcrypt_enabled) {
-		printk(KERN_ERR PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n");
+		printk(KERN_NOTICE PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n");
 		return -ENODEV;
 	}
 
drivers/crypto/padlock-sha.c +2 -2
index c666b4e..40d5680 100644
@@ -254,12 +254,12 @@ static int __init padlock_init(void)
 	int rc = -ENODEV;
 
 	if (!cpu_has_phe) {
-		printk(KERN_ERR PFX "VIA PadLock Hash Engine not detected.\n");
+		printk(KERN_NOTICE PFX "VIA PadLock Hash Engine not detected.\n");
 		return -ENODEV;
 	}
 
 	if (!cpu_has_phe_enabled) {
-		printk(KERN_ERR PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n");
+		printk(KERN_NOTICE PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n");
 		return -ENODEV;
 	}
 
Signature · 1 line
1.5.6
maintainer
#1 lore raw
Quoted 6 lines · Jeremy Katz

When loading aes or sha256 via the module aliases, the padlock modules also try to get loaded. Make the error message for them not being present only be a NOTICE rather than an ERROR so that use of 'quiet' will suppress the messages

Patch applied. Thanks Jeremy!

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt