From patchwork Sun Jan 15 15:46:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9517607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D037260113 for ; Sun, 15 Jan 2017 15:47:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C995284A2 for ; Sun, 15 Jan 2017 15:47:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 111A4284A6; Sun, 15 Jan 2017 15:47:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0284284A2 for ; Sun, 15 Jan 2017 15:47:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751308AbdAOPqf (ORCPT ); Sun, 15 Jan 2017 10:46:35 -0500 Received: from mout.web.de ([212.227.17.11]:63217 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbdAOPqe (ORCPT ); Sun, 15 Jan 2017 10:46:34 -0500 Received: from [192.168.1.2] ([78.49.147.199]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lba35-1cq3Ld3v3b-00lDSa; Sun, 15 Jan 2017 16:46:11 +0100 Subject: [PATCH 46/46] selinuxfs: Use seq_puts() in sel_avc_stats_seq_show() To: linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, Eric Paris , James Morris , Paul Moore , "Serge E. Hallyn" , Stephen Smalley , William Roberts References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <9c268e0b-a323-5f72-e445-dbf247f274d8@users.sourceforge.net> Date: Sun, 15 Jan 2017 16:46:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:6ZKdpJ4I1kx9cLLhoRLxXdKZhL+nVQH3/E4xI7k03+mg44o4XRL SxjqE/HNM8v+bPG/AuZFxg/nT6u2AIni0VrNNucpnxf9jaotwubjCmsJhTzICY/eGqyX3uc nPafvwYeljy7kXRyXNJr56Be6VmspnwWlS8b78oF21cQiGY0q7zyjQYkSygOm05gC1KkouV UlnGu4csr6EEaptnxWuWg== X-UI-Out-Filterresults: notjunk:1; V01:K0:NOv4dUZmsFQ=:/z0W5RNn2n7dqaDafrlO35 BXEEWSiBEf6gKhw5us+uUMLSPSG7hz3tSpZELzrVbvJoO55iMSbnCp52hA0vlHpo3xpAwSdoW cfUa95P4LACfZe4L2L03MXk6onqQpfwa83eWEIcPeVZKnJ24HzEwjf1a+udYeFfo3VsHz8+NV U8mIp2TkNhFroUkB7yJnOMsTbKN56OPQpnDCOTFSp8IOlC+IrL2F0X5dVhqNtEHBgprXktAsR q0cZ4K8JRcqKg9NBtIaiSxVEg9WmIdLZG0jlCF08x/tn90uZy0PSDNnGIIziIT7EyzwX7dcXp wRIbLeFrb+YuVCCY1UM+Oa/Y0+xZWMGT4ZZY3i6N85Cen5Kkz7BAGe98gEMNRAv3dX4TJ9NqR NdQjSfTjgrBrOVkai4NHtCLQcVbYeLSaZAIH3CppKzjoftGSyou/UfWNHRGGAjtBcdbQr+c/5 OZxPaAMPiwJy5sHHRP0WVQ01zbf1rBUyKvL6WucSu4IvIPN5L0J79y+EKNWxCvFvikdcZKBSW IuazqjuVoDm+8CZhJrZP6BxolX0diRbsIsz31JDm3Aiu8+iXRlih6VyKXlnncmIlmpJbq3t/h rQqpgRflkYMSfTjXfVOGdrHOyJp4e2iYp8R3zkRNE0JEOh7iC0rVTbaiytQ2gRcbprg6iNgly IK9lDPMv4hmSf2PjPmN5GOMdEMxsP5OpqhyMvF2MMJ4O+so72i5OWSMgqcm9nqxC5XLskBXfN 9WinY0ZYy58qUSzhdkGq4mco/QwTt6o7Kg9bjKhtWwa7WY43PX4FwAvFYOBIGPe+xw2bh9dPC 7XA1RjW Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 15 Jan 2017 14:04:53 +0100 A string which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- security/selinux/selinuxfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 55345f84f17d..0d81ebf7ff23 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -1445,10 +1445,10 @@ static int sel_avc_stats_seq_show(struct seq_file *seq, void *v) { struct avc_cache_stats *st = v; - if (v == SEQ_START_TOKEN) - seq_printf(seq, "lookups hits misses allocations reclaims " - "frees\n"); - else { + if (v == SEQ_START_TOKEN) { + seq_puts(seq, + "lookups hits misses allocations reclaims frees\n"); + } else { unsigned int lookups = st->lookups; unsigned int misses = st->misses; unsigned int hits = lookups - misses;