From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755343AbdEHAKU (ORCPT ); Sun, 7 May 2017 20:10:20 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:37816 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752031AbdEHAJu (ORCPT ); Sun, 7 May 2017 20:09:50 -0400 Subject: Re: [PATCH 2/2] apparmorfs: Use seq_putc() in two functions To: SF Markus Elfring , linux-security-module@vger.kernel.org, James Morris , "Serge E. Hallyn" References: <22def82a-4cd8-a673-f35f-012cc36fe797@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org From: John Johansen Organization: Canonical Message-ID: Date: Sun, 7 May 2017 05:31:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <22def82a-4cd8-a673-f35f-012cc36fe797@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/07/2017 05:03 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 7 May 2017 13:50:28 +0200 > > Two single characters (line breaks) should be put into a sequence. > Thus use the corresponding function "seq_putc". > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring Acked-by: John Johansen I'll pull it into my tree for my next push > --- > security/apparmor/apparmorfs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c > index b4d83e0bc651..41e427a4f051 100644 > --- a/security/apparmor/apparmorfs.c > +++ b/security/apparmor/apparmorfs.c > @@ -494,7 +494,7 @@ static int aa_fs_seq_hash_show(struct seq_file *seq, void *v) > if (profile->hash) { > for (i = 0; i < size; i++) > seq_printf(seq, "%.2x", profile->hash[i]); > - seq_puts(seq, "\n"); > + seq_putc(seq, '\n'); > } > aa_put_profile(profile); > > @@ -602,7 +602,7 @@ static int aa_fs_seq_raw_hash_show(struct seq_file *seq, void *v) > if (profile->rawdata->hash) { > for (i = 0; i < size; i++) > seq_printf(seq, "%.2x", profile->rawdata->hash[i]); > - seq_puts(seq, "\n"); > + seq_putc(seq, '\n'); > } > aa_put_profile(profile); > >