[PATCH] trivial: printk(KERN_* vs. pr_* and __FUNCTION_ in IMA

From: H Hartley Sweeten
Date: Thu Jul 09 2009 - 19:48:32 EST


Trivial cleanup of the IBM Integrity Measurement Architecture source.

Change a few printk(KERN_* to equivelent pr_* form and use __func__ instead
Of gcc specific __FUNCTION__. Along with some minor whitespace cleanup due
to the changes.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>

---

diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c
index b8dd693..11e6e2a 100644
--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -138,18 +138,15 @@ void iint_free(struct kref *kref)
iint->version = 0;
iint->flags = 0UL;
if (iint->readcount != 0) {
- printk(KERN_INFO "%s: readcount: %ld\n", __FUNCTION__,
- iint->readcount);
+ pr_info("%s: readcount: %ld\n", __func__, iint->readcount);
iint->readcount = 0;
}
if (iint->writecount != 0) {
- printk(KERN_INFO "%s: writecount: %ld\n", __FUNCTION__,
- iint->writecount);
+ pr_info("%s: writecount: %ld\n", __func__, iint->writecount);
iint->writecount = 0;
}
if (iint->opencount != 0) {
- printk(KERN_INFO "%s: opencount: %ld\n", __FUNCTION__,
- iint->opencount);
+ pr_info("%s: opencount: %ld\n", __func__, iint->opencount);
iint->opencount = 0;
}
kref_set(&iint->refcount, 1);
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 101c512..1a47e2c 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -55,11 +55,10 @@ void ima_file_free(struct file *file)

mutex_lock(&iint->mutex);
if (iint->opencount <= 0) {
- printk(KERN_INFO
- "%s: %s open/free imbalance (r:%ld w:%ld o:%ld f:%ld)\n",
- __FUNCTION__, file->f_dentry->d_name.name,
- iint->readcount, iint->writecount,
- iint->opencount, atomic_long_read(&file->f_count));
+ pr_info("%s: %s open/free imbalance (r:%ld w:%ld o:%ld f:%ld)\n",
+ __func__, file->f_dentry->d_name.name,
+ iint->readcount, iint->writecount,
+ iint->opencount, atomic_long_read(&file->f_count));
if (!(iint->flags & IMA_IINT_DUMP_STACK)) {
dump_stack();
iint->flags |= IMA_IINT_DUMP_STACK;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/