Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756528AbbKRST2 (ORCPT ); Wed, 18 Nov 2015 13:19:28 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:43428 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754647AbbKRST0 (ORCPT ); Wed, 18 Nov 2015 13:19:26 -0500 Subject: Re: [PATCH 3/3] security/apparmor: do not define list_entry_next To: Sergey Senozhatsky References: <1447848881-8202-1-git-send-email-sergey.senozhatsky@gmail.com> Cc: "Serge E . Hallyn" , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky From: John Johansen Organization: Canonical Message-ID: <564CC12A.2000505@canonical.com> Date: Wed, 18 Nov 2015 10:19:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447848881-8202-1-git-send-email-sergey.senozhatsky@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2497 Lines: 77 On 11/18/2015 04:14 AM, Sergey Senozhatsky wrote: > Cosmetic. > > Do not define list_entry_next() and use list_next_entry() > from list.h. > two days to late, Geliang Tang already submitted the same patch in [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next and I've pulled it into my tree still thank you for your work, it is appreciated > Signed-off-by: Sergey Senozhatsky > --- > security/apparmor/apparmorfs.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c > index ad4fa49..946e8fd 100644 > --- a/security/apparmor/apparmorfs.c > +++ b/security/apparmor/apparmorfs.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > > #include "include/apparmor.h" > #include "include/apparmorfs.h" > @@ -549,9 +550,6 @@ fail2: > return error; > } > > - > -#define list_entry_next(pos, member) \ > - list_entry(pos->member.next, typeof(*pos), member) > #define list_entry_is_head(pos, head, member) (&pos->member == (head)) > > /** > @@ -582,7 +580,7 @@ static struct aa_namespace *__next_namespace(struct aa_namespace *root, > parent = ns->parent; > while (ns != root) { > mutex_unlock(&ns->lock); > - next = list_entry_next(ns, base.list); > + next = list_next_entry(ns, base.list); > if (!list_entry_is_head(next, &parent->sub_ns, base.list)) { > mutex_lock(&next->lock); > return next; > @@ -636,7 +634,7 @@ static struct aa_profile *__next_profile(struct aa_profile *p) > parent = rcu_dereference_protected(p->parent, > mutex_is_locked(&p->ns->lock)); > while (parent) { > - p = list_entry_next(p, base.list); > + p = list_next_entry(p, base.list); > if (!list_entry_is_head(p, &parent->base.profiles, base.list)) > return p; > p = parent; > @@ -645,7 +643,7 @@ static struct aa_profile *__next_profile(struct aa_profile *p) > } > > /* is next another profile in the namespace */ > - p = list_entry_next(p, base.list); > + p = list_next_entry(p, base.list); > if (!list_entry_is_head(p, &ns->base.profiles, base.list)) > return p; > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/