Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5039522imm; Tue, 12 Jun 2018 01:16:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ1KTSXp+KIdlwr+wuXZmOlFUl8rVLp+5ku4cwEl0ZLjtoR8VTqh8khNbN2vQbO7J4QRc1O X-Received: by 2002:a17:902:5597:: with SMTP id g23-v6mr2857500pli.99.1528791408197; Tue, 12 Jun 2018 01:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528791408; cv=none; d=google.com; s=arc-20160816; b=skbH0C/dJzx1WooefzKjp01Cj/3BHwqg18ABFi+x6uJDk3VKv0EKeH/tDCbnKrbD3T 92MQocFOouMoq3dyHxDMlcReh+WRg3watAfJRUYKhC7kXmjjZM6vsquPomUoGXnSghgp YHzDs02htG6ydxBoo/FgwI6sgj7CFQPEb1L2CR5xF8+skPq8W3gIKiCGy4fUiSHgPIza tah//DkS674YkLtydJJl8IrtmS2y8D699zQXJK4YziuooLCQW3UoBw4x8PPf0kaJfNFw HZUwogrdz+KxlfQAmXttNXStSNVBgtJuQhh/ONwuPuCO7njV9z1zYtkMWClIZdq1cYQv z5jQ== 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=umjSH+vxyNoHjC+lTb1dWnMU1v2WjnQI+vA+7h2kGPA=; b=cgbIoRyAjYD//Y+DBtZvmBcJxUsMt2pUbvFYYs0KIlcVFO/FmJUwkM5vWPTFWZdZ8x mgsTR8SK3Ee4joYVfLs6r32PaWjoP38cJ+4BPq9UNXu0Avi1omk9r5A/da1cgvsBU1Od NsV+AIERvpHN5SRuhEU7GFNOr6o4JHsjKxLWEfnOvMw0ef3NPCinvAkBPjgEBjM30W2s rcV/XiHejNpvSvDkKe54BTiZys7SPMLkCYwwhB/lRZJH7YVioupKRaCbkq3yjWU14H7H xfbRn5b0dPKr+FI4WYHXt0plnX2zj0OsDbJXD3sAseHYBgnKtm5MJU0uz5UQJzbDwnJ0 iIVQ== 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 h3-v6si355742plb.100.2018.06.12.01.16.33; Tue, 12 Jun 2018 01:16:48 -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 S934030AbeFLIPG (ORCPT + 99 others); Tue, 12 Jun 2018 04:15:06 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:5942 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932803AbeFLIJt (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 01/13] selinux: Cleanup printk logging in conditional Date: Tue, 12 Jun 2018 10:09:00 +0200 Message-ID: <20180612080912.7827-2-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/conditional.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index c91543a617ac..f49e522e932d 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c @@ -96,7 +96,7 @@ int evaluate_cond_node(struct policydb *p, struct cond_node *node) if (new_state != node->cur_state) { node->cur_state = new_state; if (new_state == -1) - printk(KERN_ERR "SELinux: expression result was undefined - disabling all rules.\n"); + pr_err("SELinux: expression result was undefined - disabling all rules.\n"); /* turn the rules on or off */ for (cur = node->true_list; cur; cur = cur->next) { if (new_state <= 0) @@ -287,7 +287,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum */ if (k->specified & AVTAB_TYPE) { if (avtab_search(&p->te_avtab, k)) { - printk(KERN_ERR "SELinux: type rule already exists outside of a conditional.\n"); + pr_err("SELinux: type rule already exists outside of a conditional.\n"); goto err; } /* @@ -302,7 +302,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum node_ptr = avtab_search_node(&p->te_cond_avtab, k); if (node_ptr) { if (avtab_search_node_next(node_ptr, k->specified)) { - printk(KERN_ERR "SELinux: too many conflicting type rules.\n"); + pr_err("SELinux: too many conflicting type rules.\n"); goto err; } found = 0; @@ -313,13 +313,13 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum } } if (!found) { - printk(KERN_ERR "SELinux: conflicting type rules.\n"); + pr_err("SELinux: conflicting type rules.\n"); goto err; } } } else { if (avtab_search(&p->te_cond_avtab, k)) { - printk(KERN_ERR "SELinux: conflicting type rules when adding type rule for true.\n"); + pr_err("SELinux: conflicting type rules when adding type rule for true.\n"); goto err; } } @@ -327,7 +327,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d); if (!node_ptr) { - printk(KERN_ERR "SELinux: could not insert rule.\n"); + pr_err("SELinux: could not insert rule.\n"); rc = -ENOMEM; goto err; } @@ -387,12 +387,12 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list * static int expr_isvalid(struct policydb *p, struct cond_expr *expr) { if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { - printk(KERN_ERR "SELinux: conditional expressions uses unknown operator.\n"); + pr_err("SELinux: conditional expressions uses unknown operator.\n"); return 0; } if (expr->bool > p->p_bools.nprim) { - printk(KERN_ERR "SELinux: conditional expressions uses unknown bool.\n"); + pr_err("SELinux: conditional expressions uses unknown bool.\n"); return 0; } return 1; -- 2.15.1