mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Johansen <john.johansen@canonical.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
	linux-security-module@vger.kernel.org,
	James Morris <james.l.morris@oracle.com>,
	"Serge E. Hallyn" <serge@hallyn.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] apparmorfs: Combine two function calls into one in aa_fs_seq_raw_abi_show()
Date: Sun, 7 May 2017 05:31:00 -0700	[thread overview]
Message-ID: <af3aac53-972d-ec04-4bfb-297718300ef2@canonical.com> (raw)
In-Reply-To: <b0ee52a7-06d7-2bbb-75dc-b4a17e3dccd3@users.sourceforge.net>

On 05/07/2017 05:02 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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 <elfring@users.sourceforge.net>

Acked-by: John Johansen <john.johansen@canonical.com>

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;
> 

  reply	other threads:[~2017-05-08  0:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07 12:01 [PATCH 0/2] apparmorfs: Fine-tuning for three function implementations SF Markus Elfring
2017-05-07 12:02 ` [PATCH 1/2] apparmorfs: Combine two function calls into one in aa_fs_seq_raw_abi_show() SF Markus Elfring
2017-05-07 12:31   ` John Johansen [this message]
2017-05-07 12:03 ` [PATCH 2/2] apparmorfs: Use seq_putc() in two functions SF Markus Elfring
2017-05-07 12:31   ` John Johansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af3aac53-972d-ec04-4bfb-297718300ef2@canonical.com \
    --to=john.johansen@canonical.com \
    --cc=elfring@users.sourceforge.net \
    --cc=james.l.morris@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®