linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] apparmor: Remove duplicate macro list_entry_is_head()
@ 2020-12-08 10:06 Andy Shevchenko
  2020-12-09  0:18 ` John Johansen
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2020-12-08 10:06 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, John Johansen,
	linux-security-module, James Morris, Serge E . Hallyn
  Cc: Andy Shevchenko

Strangely I hadn't had noticed the existence of the list_entry_is_head() in
apparmor code when added the same one in the list.h. Luckily it's fully
identical and didn't break builds. In any case we don't need a duplicate
anymore, thus remove it from apparmor code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 security/apparmor/apparmorfs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 5fd4a64e431f..f95c6bfa8b8e 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -2046,9 +2046,6 @@ int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,
 	return error;
 }
 
-
-#define list_entry_is_head(pos, head, member) (&pos->member == (head))
-
 /**
  * __next_ns - find the next namespace to list
  * @root: root namespace to stop search at (NOT NULL)
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] apparmor: Remove duplicate macro list_entry_is_head()
  2020-12-08 10:06 [PATCH v1] apparmor: Remove duplicate macro list_entry_is_head() Andy Shevchenko
@ 2020-12-09  0:18 ` John Johansen
  0 siblings, 0 replies; 2+ messages in thread
From: John Johansen @ 2020-12-09  0:18 UTC (permalink / raw)
  To: Andy Shevchenko, Andrew Morton, linux-kernel,
	linux-security-module, James Morris, Serge E . Hallyn

On 12/8/20 2:06 AM, Andy Shevchenko wrote:
> Strangely I hadn't had noticed the existence of the list_entry_is_head() in
> apparmor code when added the same one in the list.h. Luckily it's fully
> identical and didn't break builds. In any case we don't need a duplicate
> anymore, thus remove it from apparmor code.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

oh nice,

I will pull into the apparmor tree

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

> ---
>  security/apparmor/apparmorfs.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index 5fd4a64e431f..f95c6bfa8b8e 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -2046,9 +2046,6 @@ int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,
>  	return error;
>  }
>  
> -
> -#define list_entry_is_head(pos, head, member) (&pos->member == (head))
> -
>  /**
>   * __next_ns - find the next namespace to list
>   * @root: root namespace to stop search at (NOT NULL)
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-09  0:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 10:06 [PATCH v1] apparmor: Remove duplicate macro list_entry_is_head() Andy Shevchenko
2020-12-09  0:18 ` John Johansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).