Commit 180cfc58 authored by peter enderborg's avatar peter enderborg Committed by Paul Moore

selinux: Cleanup printk logging in ebitmap

Replace printk with pr_* to avoid checkpatch warnings.
Signed-off-by: default avatarPeter Enderborg <peter.enderborg@sony.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent ab48576c
...@@ -362,7 +362,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -362,7 +362,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
count = le32_to_cpu(buf[2]); count = le32_to_cpu(buf[2]);
if (mapunit != BITS_PER_U64) { if (mapunit != BITS_PER_U64) {
printk(KERN_ERR "SELinux: ebitmap: map size %u does not " pr_err("SELinux: ebitmap: map size %u does not "
"match my size %zd (high bit was %d)\n", "match my size %zd (high bit was %d)\n",
mapunit, BITS_PER_U64, e->highbit); mapunit, BITS_PER_U64, e->highbit);
goto bad; goto bad;
...@@ -383,19 +383,19 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -383,19 +383,19 @@ int ebitmap_read(struct ebitmap *e, void *fp)
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
rc = next_entry(&startbit, fp, sizeof(u32)); rc = next_entry(&startbit, fp, sizeof(u32));
if (rc < 0) { if (rc < 0) {
printk(KERN_ERR "SELinux: ebitmap: truncated map\n"); pr_err("SELinux: ebitmap: truncated map\n");
goto bad; goto bad;
} }
startbit = le32_to_cpu(startbit); startbit = le32_to_cpu(startbit);
if (startbit & (mapunit - 1)) { if (startbit & (mapunit - 1)) {
printk(KERN_ERR "SELinux: ebitmap start bit (%d) is " pr_err("SELinux: ebitmap start bit (%d) is "
"not a multiple of the map unit size (%u)\n", "not a multiple of the map unit size (%u)\n",
startbit, mapunit); startbit, mapunit);
goto bad; goto bad;
} }
if (startbit > e->highbit - mapunit) { if (startbit > e->highbit - mapunit) {
printk(KERN_ERR "SELinux: ebitmap start bit (%d) is " pr_err("SELinux: ebitmap start bit (%d) is "
"beyond the end of the bitmap (%u)\n", "beyond the end of the bitmap (%u)\n",
startbit, (e->highbit - mapunit)); startbit, (e->highbit - mapunit));
goto bad; goto bad;
...@@ -405,8 +405,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -405,8 +405,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
struct ebitmap_node *tmp; struct ebitmap_node *tmp;
tmp = kmem_cache_zalloc(ebitmap_node_cachep, GFP_KERNEL); tmp = kmem_cache_zalloc(ebitmap_node_cachep, GFP_KERNEL);
if (!tmp) { if (!tmp) {
printk(KERN_ERR pr_err("SELinux: ebitmap: out of memory\n");
"SELinux: ebitmap: out of memory\n");
rc = -ENOMEM; rc = -ENOMEM;
goto bad; goto bad;
} }
...@@ -418,7 +417,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -418,7 +417,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
e->node = tmp; e->node = tmp;
n = tmp; n = tmp;
} else if (startbit <= n->startbit) { } else if (startbit <= n->startbit) {
printk(KERN_ERR "SELinux: ebitmap: start bit %d" pr_err("SELinux: ebitmap: start bit %d"
" comes after start bit %d\n", " comes after start bit %d\n",
startbit, n->startbit); startbit, n->startbit);
goto bad; goto bad;
...@@ -426,7 +425,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -426,7 +425,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
rc = next_entry(&map, fp, sizeof(u64)); rc = next_entry(&map, fp, sizeof(u64));
if (rc < 0) { if (rc < 0) {
printk(KERN_ERR "SELinux: ebitmap: truncated map\n"); pr_err("SELinux: ebitmap: truncated map\n");
goto bad; goto bad;
} }
map = le64_to_cpu(map); map = le64_to_cpu(map);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment