Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5040421imm; Tue, 12 Jun 2018 01:17:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLw0gJnplhPjfVLh0N6eL9dpQNvtBH85ZmQ2XhTv+f1ropgZahUf3zOGQ2hTmgp9OhYKE2F X-Received: by 2002:a17:902:329:: with SMTP id 38-v6mr2989830pld.328.1528791469210; Tue, 12 Jun 2018 01:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528791469; cv=none; d=google.com; s=arc-20160816; b=yOoEe50V98upak5pZAjoZAuOjO6tJQ4O4EEpSAfsGTkOwFPrpxp8L5kIAS8RCYJ3qM UxybXcyqwLjKO8DnX5kDJfQ5LCG2bEDpoveu7261uSaO0Qatr+NDJEoKAcghrFmmpee3 3i7CGC9dsDKY14Zzdqcb+Fmp4RNtQW/6FGulKJgj+8IW/S+Biqs7TT9wpyZIzO2OY9+X Jg2DYfX7jiflYGyVEbD9hPZR68L9RDOk8GoVoYL08kIJF5EQIWdwfCxQKGNrYGpbaxhr Bpuzo8VumhCJRV3OYz26Wg7C1NjprbznCnwwZFnjDm4do5qs+VdtaGGy85REdCWO4SnZ ukDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:to:from:arc-authentication-results; bh=4pf8TAlnjNK/v56t4Hq7ilxIxW6OzeTZB6Xb06nhYJ8=; b=Ekag8NYD8VMKH+433pfqLRX72448yLmt3Q24HyEJPGqqOcmzA080GDfk56rkHxGFWA bNkKSPmUC/h49/EuTTX4p5oWNzenheX/S3JlmuqAigsMiePn5r2dwMWePE+Wgihg6uFv IUoY0sdv5J5d61VskrHUnTzvkkKihH9ASWhLDdtccTk7l7Oj/gPkUq1rYfR4cnBmQJgw UyhHX0jT2qbWeiLEZ1i+GlM0O3HrkfbRxJYqs3imzoAg8RnvsPJO72OMfbY+9j3qjoyD qI9VFSekAV42Vneks96KkyLCuNPErlvfDsN6AIMQWAFLh8R2qqmvqG2PEnCdPxdvCh4A Cb0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg2-v6si329348plb.243.2018.06.12.01.17.34; Tue, 12 Jun 2018 01:17:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933965AbeFLIPF (ORCPT + 99 others); Tue, 12 Jun 2018 04:15:05 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:5941 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933419AbeFLIJt (ORCPT ); Tue, 12 Jun 2018 04:09:49 -0400 From: Peter Enderborg To: , Paul Moore , Stephen Smalley , Eric Paris , James Morris , Daniel Jurgens , Doug Ledford , , , , "Serge E . Hallyn" Subject: [PATCH 02/13] selinux: Cleanup printk logging in ebitmap Date: Tue, 12 Jun 2018 10:09:01 +0200 Message-ID: <20180612080912.7827-3-peter.enderborg@sony.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180612080912.7827-1-peter.enderborg@sony.com> References: <20180612080912.7827-1-peter.enderborg@sony.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace printk with pr_* to avoid checkpatch warnings. Signed-off-by: Peter Enderborg --- 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