From: Peter Enderborg <peter.enderborg@sony.com>
To: <peter.enderborg@sony.com>, Paul Moore <paul@paul-moore.com>,
Stephen Smalley <sds@tycho.nsa.gov>,
Eric Paris <eparis@parisplace.org>,
James Morris <jmorris@namei.org>,
Daniel Jurgens <danielj@mellanox.com>,
Doug Ledford <dledford@redhat.com>, <selinux@tycho.nsa.gov>,
<linux-security-module@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Serge E . Hallyn" <serge@hallyn.com>
Subject: [PATCH 02/13] selinux: Cleanup printk logging in ebitmap
Date: Tue, 12 Jun 2018 10:09:01 +0200 [thread overview]
Message-ID: <20180612080912.7827-3-peter.enderborg@sony.com> (raw)
In-Reply-To: <20180612080912.7827-1-peter.enderborg@sony.com>
Replace printk with pr_* to avoid checkpatch warnings.
Signed-off-by: Peter Enderborg <peter.enderborg@sony.com>
---
security/selinux/ss/ebitmap.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
index 5ae8c61b75bf..8f624f80055b 100644
--- a/security/selinux/ss/ebitmap.c
+++ b/security/selinux/ss/ebitmap.c
@@ -362,7 +362,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
count = le32_to_cpu(buf[2]);
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",
mapunit, BITS_PER_U64, e->highbit);
goto bad;
@@ -383,19 +383,19 @@ int ebitmap_read(struct ebitmap *e, void *fp)
for (i = 0; i < count; i++) {
rc = next_entry(&startbit, fp, sizeof(u32));
if (rc < 0) {
- printk(KERN_ERR "SELinux: ebitmap: truncated map\n");
+ pr_err("SELinux: ebitmap: truncated map\n");
goto bad;
}
startbit = le32_to_cpu(startbit);
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",
startbit, mapunit);
goto bad;
}
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",
startbit, (e->highbit - mapunit));
goto bad;
@@ -405,8 +405,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
struct ebitmap_node *tmp;
tmp = kmem_cache_zalloc(ebitmap_node_cachep, GFP_KERNEL);
if (!tmp) {
- printk(KERN_ERR
- "SELinux: ebitmap: out of memory\n");
+ pr_err("SELinux: ebitmap: out of memory\n");
rc = -ENOMEM;
goto bad;
}
@@ -418,7 +417,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
e->node = tmp;
n = tmp;
} 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",
startbit, n->startbit);
goto bad;
@@ -426,7 +425,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
rc = next_entry(&map, fp, sizeof(u64));
if (rc < 0) {
- printk(KERN_ERR "SELinux: ebitmap: truncated map\n");
+ pr_err("SELinux: ebitmap: truncated map\n");
goto bad;
}
map = le64_to_cpu(map);
--
2.15.1
next prev parent reply other threads:[~2018-06-12 8:15 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 8:08 [PATCH 00/13 selinux-next] selinux: Cleanup printk logging Peter Enderborg
2018-06-12 8:09 ` [PATCH 01/13] selinux: Cleanup printk logging in conditional Peter Enderborg
2018-06-12 14:38 ` Joe Perches
2018-06-13 6:23 ` peter enderborg
2018-06-13 17:38 ` J Freyensee
2018-06-19 15:46 ` Paul Moore
2018-06-12 8:09 ` Peter Enderborg [this message]
2018-06-19 15:49 ` [PATCH 02/13] selinux: Cleanup printk logging in ebitmap Paul Moore
2018-06-12 8:09 ` [PATCH 03/13] selinux: Cleanup printk logging in policydb Peter Enderborg
2018-06-19 16:41 ` Paul Moore
2018-06-19 16:45 ` Joe Perches
2018-06-19 16:51 ` Paul Moore
2018-06-12 8:09 ` [PATCH 04/13] selinux: Cleanup printk logging in hooks Peter Enderborg
2018-06-19 16:44 ` Paul Moore
2018-06-12 8:09 ` [PATCH 05/13] selinux: Cleanup printk logging in avtab Peter Enderborg
2018-06-19 17:03 ` Paul Moore
2018-06-12 8:09 ` [PATCH 06/13] selinux: Cleanup printk logging in services Peter Enderborg
2018-06-19 17:13 ` Paul Moore
2018-06-12 8:09 ` [PATCH 07/13] selinux: Cleanup printk logging in selinuxfs Peter Enderborg
2018-06-19 17:15 ` Paul Moore
2018-06-12 8:09 ` [PATCH 08/13] selinux: Cleanup printk logging in netlink Peter Enderborg
2018-06-19 17:34 ` Paul Moore
2018-06-12 8:09 ` [PATCH 09/13] selinux: Cleanup printk logging in sidtab Peter Enderborg
2018-06-19 17:39 ` Paul Moore
2018-06-12 8:09 ` [PATCH 10/13] selinux: Cleanup printk logging in netport Peter Enderborg
2018-06-19 17:44 ` Paul Moore
2018-06-12 8:09 ` [PATCH 11/13] selinux: Cleanup printk logging in netif Peter Enderborg
2018-06-19 17:46 ` Paul Moore
2018-06-12 8:09 ` [PATCH 12/13] selinux: Cleanup printk logging in avc Peter Enderborg
2018-06-19 17:48 ` Paul Moore
2018-06-12 8:09 ` [PATCH 13/13] selinux: Cleanup printk logging in netnode Peter Enderborg
2018-06-19 17:50 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180612080912.7827-3-peter.enderborg@sony.com \
--to=peter.enderborg@sony.com \
--cc=danielj@mellanox.com \
--cc=dledford@redhat.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=serge@hallyn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox