From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932145AbdC2Pxp (ORCPT ); Wed, 29 Mar 2017 11:53:45 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:36827 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752571AbdC2Pxn (ORCPT ); Wed, 29 Mar 2017 11:53:43 -0400 MIME-Version: 1.0 X-Originating-IP: [108.49.102.27] In-Reply-To: <9c268e0b-a323-5f72-e445-dbf247f274d8@users.sourceforge.net> References: <9c268e0b-a323-5f72-e445-dbf247f274d8@users.sourceforge.net> From: Paul Moore Date: Wed, 29 Mar 2017 11:53:41 -0400 Message-ID: Subject: Re: [PATCH 46/46] selinuxfs: Use seq_puts() in sel_avc_stats_seq_show() To: SF Markus Elfring Cc: linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, Eric Paris , James Morris , "Serge E. Hallyn" , Stephen Smalley , William Roberts , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 15, 2017 at 10:46 AM, SF Markus Elfring wrote: > 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(-) Merged, thanks. > 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; > -- > 2.11.0 > -- paul moore www.paul-moore.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Moore Date: Wed, 29 Mar 2017 15:53:41 +0000 Subject: Re: [PATCH 46/46] selinuxfs: Use seq_puts() in sel_avc_stats_seq_show() Message-Id: List-Id: References: <9c268e0b-a323-5f72-e445-dbf247f274d8@users.sourceforge.net> In-Reply-To: <9c268e0b-a323-5f72-e445-dbf247f274d8@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-security-module@vger.kernel.org On Sun, Jan 15, 2017 at 10:46 AM, SF Markus Elfring wrote: > 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(-) Merged, thanks. > 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; > -- > 2.11.0 > -- paul moore www.paul-moore.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul@paul-moore.com (Paul Moore) Date: Wed, 29 Mar 2017 11:53:41 -0400 Subject: [PATCH 46/46] selinuxfs: Use seq_puts() in sel_avc_stats_seq_show() In-Reply-To: <9c268e0b-a323-5f72-e445-dbf247f274d8@users.sourceforge.net> References: <9c268e0b-a323-5f72-e445-dbf247f274d8@users.sourceforge.net> Message-ID: To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Sun, Jan 15, 2017 at 10:46 AM, SF Markus Elfring wrote: > 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(-) Merged, thanks. > 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; > -- > 2.11.0 > -- paul moore www.paul-moore.com -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html