Skip to contentSkip to conversation

kvm, svm: Cleanup error statements

PATCH Applied Borislav Petkov 2 participants 2 messages Oct 20, 2012 – Oct 22, 2012

Subsystems (2)
lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 kvm, svm: Cleanup error statements

Use __func__ instead of the function name in svm_hardware_enable since those things tend to get out of sync. This also slims down printk line length in conjunction with using pr_err.

No functionality change.

Cc Joerg Roedel <[email protected]>
Cc Avi Kivity <[email protected]>
---
 arch/x86/kvm/svm.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
arch/x86/kvm/svm.c +2 -5
index d017df3899ef..e93908fabf46 100644
@@ -630,15 +630,12 @@ static int svm_hardware_enable(void *garbage)
 		return -EBUSY;
 
 	if (!has_svm()) {
-		printk(KERN_ERR "svm_hardware_enable: err EOPNOTSUPP on %d\n",
-		       me);
+		pr_err("%s: err EOPNOTSUPP on %d\n", __func__, me);
 		return -EINVAL;
 	}
 	sd = per_cpu(svm_data, me);
-
 	if (!sd) {
-		printk(KERN_ERR "svm_hardware_enable: svm_data is NULL on %d\n",
-		       me);
+		pr_err("%s: svm_data is NULL on %d\n", __func__, me);
 		return -EINVAL;
 	}
 
Signature · 1 line
1.8.0.rc2
Applied
#1 lore raw
Quoted 6 lines · Borislav Petkov

Use __func__ instead of the function name in svm_hardware_enable since those things tend to get out of sync. This also slims down printk line length in conjunction with using pr_err.

No functionality change.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function