From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754969AbdEHAKB (ORCPT ); Sun, 7 May 2017 20:10:01 -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 S1754144AbdEHAJv (ORCPT ); Sun, 7 May 2017 20:09:51 -0400 Subject: Re: [PATCH 1/2] apparmorfs: Combine two function calls into one in aa_fs_seq_raw_abi_show() To: SF Markus Elfring , linux-security-module@vger.kernel.org, James Morris , "Serge E. Hallyn" References: Cc: LKML , kernel-janitors@vger.kernel.org From: John Johansen Organization: Canonical Message-ID: Date: Sun, 7 May 2017 05:31:00 -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: 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:02 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 7 May 2017 13:43:50 +0200 > > A bit of data was put into a sequence by two separate function calls. > Print the same data by a single function call instead. > > Signed-off-by: Markus Elfring Acked-by: John Johansen I'll pull it into my tree for my next push > --- > security/apparmor/apparmorfs.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c > index 4f6ac9dbc65d..b4d83e0bc651 100644 > --- a/security/apparmor/apparmorfs.c > +++ b/security/apparmor/apparmorfs.c > @@ -572,10 +572,9 @@ static int aa_fs_seq_raw_abi_show(struct seq_file *seq, void *v) > struct aa_proxy *proxy = seq->private; > struct aa_profile *profile = aa_get_profile_rcu(&proxy->profile); > > - if (profile->rawdata->abi) { > - seq_printf(seq, "v%d", profile->rawdata->abi); > - seq_puts(seq, "\n"); > - } > + if (profile->rawdata->abi) > + seq_printf(seq, "v%d\n", profile->rawdata->abi); > + > aa_put_profile(profile); > > return 0; >