public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next
@ 2015-11-16 13:46 Geliang Tang
  2015-11-16 13:46 ` [PATCH 2/3] libceph: " Geliang Tang
  2015-11-16 17:08 ` [PATCH 1/3] misc: mic/scif: " Sudeep Dutt
  0 siblings, 2 replies; 7+ messages in thread
From: Geliang Tang @ 2015-11-16 13:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sudeep Dutt; +Cc: Geliang Tang, linux-kernel

list_next_entry has been defined in list.h, so I replace list_entry_next
with it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/misc/mic/scif/scif_dma.c | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/drivers/misc/mic/scif/scif_dma.c b/drivers/misc/mic/scif/scif_dma.c
index 95a13c6..8804bcc 100644
--- a/drivers/misc/mic/scif/scif_dma.c
+++ b/drivers/misc/mic/scif/scif_dma.c
@@ -74,11 +74,6 @@ struct scif_copy_work {
 	bool ordered;
 };
 
-#ifndef list_entry_next
-#define list_entry_next(pos, member) \
-	list_entry(pos->member.next, typeof(*pos), member)
-#endif
-
 /**
  * scif_reserve_dma_chan:
  * @ep: Endpoint Descriptor.
@@ -851,7 +846,7 @@ static void scif_rma_local_cpu_copy(s64 offset, struct scif_window *window,
 		(window->nr_pages << PAGE_SHIFT);
 	while (rem_len) {
 		if (offset == end_offset) {
-			window = list_entry_next(window, list);
+			window = list_next_entry(window, list);
 			end_offset = window->offset +
 				(window->nr_pages << PAGE_SHIFT);
 		}
@@ -957,7 +952,7 @@ scif_rma_list_dma_copy_unaligned(struct scif_copy_work *work,
 	remaining_len -= tail_len;
 	while (remaining_len) {
 		if (offset == end_offset) {
-			window = list_entry_next(window, list);
+			window = list_next_entry(window, list);
 			end_offset = window->offset +
 				(window->nr_pages << PAGE_SHIFT);
 		}
@@ -1064,7 +1059,7 @@ scif_rma_list_dma_copy_unaligned(struct scif_copy_work *work,
 	}
 	if (tail_len) {
 		if (offset == end_offset) {
-			window = list_entry_next(window, list);
+			window = list_next_entry(window, list);
 			end_offset = window->offset +
 				(window->nr_pages << PAGE_SHIFT);
 		}
@@ -1147,13 +1142,13 @@ static int _scif_rma_list_dma_copy_aligned(struct scif_copy_work *work,
 		(dst_window->nr_pages << PAGE_SHIFT);
 	while (remaining_len) {
 		if (src_offset == end_src_offset) {
-			src_window = list_entry_next(src_window, list);
+			src_window = list_next_entry(src_window, list);
 			end_src_offset = src_window->offset +
 				(src_window->nr_pages << PAGE_SHIFT);
 			scif_init_window_iter(src_window, &src_win_iter);
 		}
 		if (dst_offset == end_dst_offset) {
-			dst_window = list_entry_next(dst_window, list);
+			dst_window = list_next_entry(dst_window, list);
 			end_dst_offset = dst_window->offset +
 				(dst_window->nr_pages << PAGE_SHIFT);
 			scif_init_window_iter(dst_window, &dst_win_iter);
@@ -1314,13 +1309,13 @@ static int scif_rma_list_dma_copy_aligned(struct scif_copy_work *work,
 	remaining_len -= tail_len;
 	while (remaining_len) {
 		if (src_offset == end_src_offset) {
-			src_window = list_entry_next(src_window, list);
+			src_window = list_next_entry(src_window, list);
 			end_src_offset = src_window->offset +
 				(src_window->nr_pages << PAGE_SHIFT);
 			scif_init_window_iter(src_window, &src_win_iter);
 		}
 		if (dst_offset == end_dst_offset) {
-			dst_window = list_entry_next(dst_window, list);
+			dst_window = list_next_entry(dst_window, list);
 			end_dst_offset = dst_window->offset +
 				(dst_window->nr_pages << PAGE_SHIFT);
 			scif_init_window_iter(dst_window, &dst_win_iter);
@@ -1405,9 +1400,9 @@ static int scif_rma_list_dma_copy_aligned(struct scif_copy_work *work,
 	if (remaining_len) {
 		loop_len = remaining_len;
 		if (src_offset == end_src_offset)
-			src_window = list_entry_next(src_window, list);
+			src_window = list_next_entry(src_window, list);
 		if (dst_offset == end_dst_offset)
-			dst_window = list_entry_next(dst_window, list);
+			dst_window = list_next_entry(dst_window, list);
 
 		src_dma_addr = __scif_off_to_dma_addr(src_window, src_offset);
 		dst_dma_addr = __scif_off_to_dma_addr(dst_window, dst_offset);
@@ -1550,12 +1545,12 @@ static int scif_rma_list_cpu_copy(struct scif_copy_work *work)
 			end_dst_offset = dst_window->offset +
 				(dst_window->nr_pages << PAGE_SHIFT);
 			if (src_offset == end_src_offset) {
-				src_window = list_entry_next(src_window, list);
+				src_window = list_next_entry(src_window, list);
 				scif_init_window_iter(src_window,
 						      &src_win_iter);
 			}
 			if (dst_offset == end_dst_offset) {
-				dst_window = list_entry_next(dst_window, list);
+				dst_window = list_next_entry(dst_window, list);
 				scif_init_window_iter(dst_window,
 						      &dst_win_iter);
 			}
-- 
2.5.0



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

* [PATCH 2/3] libceph: use list_next_entry instead of list_entry_next
  2015-11-16 13:46 [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next Geliang Tang
@ 2015-11-16 13:46 ` Geliang Tang
  2015-11-16 13:46   ` [PATCH 3/3] apparmor: " Geliang Tang
  2015-11-17 16:27   ` [PATCH 2/3] libceph: " Ilya Dryomov
  2015-11-16 17:08 ` [PATCH 1/3] misc: mic/scif: " Sudeep Dutt
  1 sibling, 2 replies; 7+ messages in thread
From: Geliang Tang @ 2015-11-16 13:46 UTC (permalink / raw)
  To: Ilya Dryomov, Yan, Zheng, Sage Weil, David S. Miller
  Cc: Geliang Tang, ceph-devel, netdev, linux-kernel

list_next_entry has been defined in list.h, so I replace list_entry_next
with it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 net/ceph/messenger.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 9981039..b1d1489 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -23,9 +23,6 @@
 #include <linux/ceph/pagelist.h>
 #include <linux/export.h>
 
-#define list_entry_next(pos, member)					\
-	list_entry(pos->member.next, typeof(*pos), member)
-
 /*
  * Ceph uses the messenger to exchange ceph_msg messages with other
  * hosts in the system.  The messenger provides ordered and reliable
@@ -1042,7 +1039,7 @@ static bool ceph_msg_data_pagelist_advance(struct ceph_msg_data_cursor *cursor,
 	/* Move on to the next page */
 
 	BUG_ON(list_is_last(&cursor->page->lru, &pagelist->head));
-	cursor->page = list_entry_next(cursor->page, lru);
+	cursor->page = list_next_entry(cursor->page, lru);
 	cursor->last_piece = cursor->resid <= PAGE_SIZE;
 
 	return true;
@@ -1166,7 +1163,7 @@ static bool ceph_msg_data_advance(struct ceph_msg_data_cursor *cursor,
 	if (!cursor->resid && cursor->total_resid) {
 		WARN_ON(!cursor->last_piece);
 		BUG_ON(list_is_last(&cursor->data->links, cursor->data_head));
-		cursor->data = list_entry_next(cursor->data, links);
+		cursor->data = list_next_entry(cursor->data, links);
 		__ceph_msg_data_cursor_init(cursor);
 		new_piece = true;
 	}
-- 
2.5.0



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

* [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next
  2015-11-16 13:46 ` [PATCH 2/3] libceph: " Geliang Tang
@ 2015-11-16 13:46   ` Geliang Tang
  2015-11-18  3:44     ` Serge E. Hallyn
  2015-11-18  5:09     ` John Johansen
  2015-11-17 16:27   ` [PATCH 2/3] libceph: " Ilya Dryomov
  1 sibling, 2 replies; 7+ messages in thread
From: Geliang Tang @ 2015-11-16 13:46 UTC (permalink / raw)
  To: John Johansen, James Morris, Serge E. Hallyn
  Cc: Geliang Tang, linux-security-module, linux-kernel

list_next_entry has been defined in list.h, so I replace list_entry_next
with it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 security/apparmor/apparmorfs.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index ad4fa49..7a00bb7 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -550,8 +550,6 @@ fail2:
 }
 
 
-#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;
 
-- 
2.5.0



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

* Re: [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next
  2015-11-16 13:46 [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next Geliang Tang
  2015-11-16 13:46 ` [PATCH 2/3] libceph: " Geliang Tang
@ 2015-11-16 17:08 ` Sudeep Dutt
  1 sibling, 0 replies; 7+ messages in thread
From: Sudeep Dutt @ 2015-11-16 17:08 UTC (permalink / raw)
  To: Geliang Tang; +Cc: Sudeep Dutt, Greg Kroah-Hartman, linux-kernel

On Mon, 2015-11-16 at 21:46 +0800, Geliang Tang wrote:
> list_next_entry has been defined in list.h, so I replace list_entry_next
> with it.
> 

Thanks for the cleanup.

Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>

> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  drivers/misc/mic/scif/scif_dma.c | 27 +++++++++++----------------
>  1 file changed, 11 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/misc/mic/scif/scif_dma.c b/drivers/misc/mic/scif/scif_dma.c
> index 95a13c6..8804bcc 100644
> --- a/drivers/misc/mic/scif/scif_dma.c
> +++ b/drivers/misc/mic/scif/scif_dma.c
> @@ -74,11 +74,6 @@ struct scif_copy_work {
>  	bool ordered;
>  };
>  
> -#ifndef list_entry_next
> -#define list_entry_next(pos, member) \
> -	list_entry(pos->member.next, typeof(*pos), member)
> -#endif
> -
>  /**
>   * scif_reserve_dma_chan:
>   * @ep: Endpoint Descriptor.
> @@ -851,7 +846,7 @@ static void scif_rma_local_cpu_copy(s64 offset, struct scif_window *window,
>  		(window->nr_pages << PAGE_SHIFT);
>  	while (rem_len) {
>  		if (offset == end_offset) {
> -			window = list_entry_next(window, list);
> +			window = list_next_entry(window, list);
>  			end_offset = window->offset +
>  				(window->nr_pages << PAGE_SHIFT);
>  		}
> @@ -957,7 +952,7 @@ scif_rma_list_dma_copy_unaligned(struct scif_copy_work *work,
>  	remaining_len -= tail_len;
>  	while (remaining_len) {
>  		if (offset == end_offset) {
> -			window = list_entry_next(window, list);
> +			window = list_next_entry(window, list);
>  			end_offset = window->offset +
>  				(window->nr_pages << PAGE_SHIFT);
>  		}
> @@ -1064,7 +1059,7 @@ scif_rma_list_dma_copy_unaligned(struct scif_copy_work *work,
>  	}
>  	if (tail_len) {
>  		if (offset == end_offset) {
> -			window = list_entry_next(window, list);
> +			window = list_next_entry(window, list);
>  			end_offset = window->offset +
>  				(window->nr_pages << PAGE_SHIFT);
>  		}
> @@ -1147,13 +1142,13 @@ static int _scif_rma_list_dma_copy_aligned(struct scif_copy_work *work,
>  		(dst_window->nr_pages << PAGE_SHIFT);
>  	while (remaining_len) {
>  		if (src_offset == end_src_offset) {
> -			src_window = list_entry_next(src_window, list);
> +			src_window = list_next_entry(src_window, list);
>  			end_src_offset = src_window->offset +
>  				(src_window->nr_pages << PAGE_SHIFT);
>  			scif_init_window_iter(src_window, &src_win_iter);
>  		}
>  		if (dst_offset == end_dst_offset) {
> -			dst_window = list_entry_next(dst_window, list);
> +			dst_window = list_next_entry(dst_window, list);
>  			end_dst_offset = dst_window->offset +
>  				(dst_window->nr_pages << PAGE_SHIFT);
>  			scif_init_window_iter(dst_window, &dst_win_iter);
> @@ -1314,13 +1309,13 @@ static int scif_rma_list_dma_copy_aligned(struct scif_copy_work *work,
>  	remaining_len -= tail_len;
>  	while (remaining_len) {
>  		if (src_offset == end_src_offset) {
> -			src_window = list_entry_next(src_window, list);
> +			src_window = list_next_entry(src_window, list);
>  			end_src_offset = src_window->offset +
>  				(src_window->nr_pages << PAGE_SHIFT);
>  			scif_init_window_iter(src_window, &src_win_iter);
>  		}
>  		if (dst_offset == end_dst_offset) {
> -			dst_window = list_entry_next(dst_window, list);
> +			dst_window = list_next_entry(dst_window, list);
>  			end_dst_offset = dst_window->offset +
>  				(dst_window->nr_pages << PAGE_SHIFT);
>  			scif_init_window_iter(dst_window, &dst_win_iter);
> @@ -1405,9 +1400,9 @@ static int scif_rma_list_dma_copy_aligned(struct scif_copy_work *work,
>  	if (remaining_len) {
>  		loop_len = remaining_len;
>  		if (src_offset == end_src_offset)
> -			src_window = list_entry_next(src_window, list);
> +			src_window = list_next_entry(src_window, list);
>  		if (dst_offset == end_dst_offset)
> -			dst_window = list_entry_next(dst_window, list);
> +			dst_window = list_next_entry(dst_window, list);
>  
>  		src_dma_addr = __scif_off_to_dma_addr(src_window, src_offset);
>  		dst_dma_addr = __scif_off_to_dma_addr(dst_window, dst_offset);
> @@ -1550,12 +1545,12 @@ static int scif_rma_list_cpu_copy(struct scif_copy_work *work)
>  			end_dst_offset = dst_window->offset +
>  				(dst_window->nr_pages << PAGE_SHIFT);
>  			if (src_offset == end_src_offset) {
> -				src_window = list_entry_next(src_window, list);
> +				src_window = list_next_entry(src_window, list);
>  				scif_init_window_iter(src_window,
>  						      &src_win_iter);
>  			}
>  			if (dst_offset == end_dst_offset) {
> -				dst_window = list_entry_next(dst_window, list);
> +				dst_window = list_next_entry(dst_window, list);
>  				scif_init_window_iter(dst_window,
>  						      &dst_win_iter);
>  			}



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

* Re: [PATCH 2/3] libceph: use list_next_entry instead of list_entry_next
  2015-11-16 13:46 ` [PATCH 2/3] libceph: " Geliang Tang
  2015-11-16 13:46   ` [PATCH 3/3] apparmor: " Geliang Tang
@ 2015-11-17 16:27   ` Ilya Dryomov
  1 sibling, 0 replies; 7+ messages in thread
From: Ilya Dryomov @ 2015-11-17 16:27 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Yan, Zheng, Sage Weil, David S. Miller, Ceph Development, netdev,
	linux-kernel@vger.kernel.org

On Mon, Nov 16, 2015 at 2:46 PM, Geliang Tang <geliangtang@163.com> wrote:
> list_next_entry has been defined in list.h, so I replace list_entry_next
> with it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  net/ceph/messenger.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
> index 9981039..b1d1489 100644
> --- a/net/ceph/messenger.c
> +++ b/net/ceph/messenger.c
> @@ -23,9 +23,6 @@
>  #include <linux/ceph/pagelist.h>
>  #include <linux/export.h>
>
> -#define list_entry_next(pos, member)                                   \
> -       list_entry(pos->member.next, typeof(*pos), member)
> -
>  /*
>   * Ceph uses the messenger to exchange ceph_msg messages with other
>   * hosts in the system.  The messenger provides ordered and reliable
> @@ -1042,7 +1039,7 @@ static bool ceph_msg_data_pagelist_advance(struct ceph_msg_data_cursor *cursor,
>         /* Move on to the next page */
>
>         BUG_ON(list_is_last(&cursor->page->lru, &pagelist->head));
> -       cursor->page = list_entry_next(cursor->page, lru);
> +       cursor->page = list_next_entry(cursor->page, lru);
>         cursor->last_piece = cursor->resid <= PAGE_SIZE;
>
>         return true;
> @@ -1166,7 +1163,7 @@ static bool ceph_msg_data_advance(struct ceph_msg_data_cursor *cursor,
>         if (!cursor->resid && cursor->total_resid) {
>                 WARN_ON(!cursor->last_piece);
>                 BUG_ON(list_is_last(&cursor->data->links, cursor->data_head));
> -               cursor->data = list_entry_next(cursor->data, links);
> +               cursor->data = list_next_entry(cursor->data, links);
>                 __ceph_msg_data_cursor_init(cursor);
>                 new_piece = true;
>         }

Applied.

Thanks,

                Ilya

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

* Re: [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next
  2015-11-16 13:46   ` [PATCH 3/3] apparmor: " Geliang Tang
@ 2015-11-18  3:44     ` Serge E. Hallyn
  2015-11-18  5:09     ` John Johansen
  1 sibling, 0 replies; 7+ messages in thread
From: Serge E. Hallyn @ 2015-11-18  3:44 UTC (permalink / raw)
  To: Geliang Tang
  Cc: John Johansen, James Morris, Serge E. Hallyn,
	linux-security-module, linux-kernel

On Mon, Nov 16, 2015 at 09:46:33PM +0800, Geliang Tang wrote:
> list_next_entry has been defined in list.h, so I replace list_entry_next
> with it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Seems reasonable.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>

> ---
>  security/apparmor/apparmorfs.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index ad4fa49..7a00bb7 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -550,8 +550,6 @@ fail2:
>  }
>  
>  
> -#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;
>  
> -- 
> 2.5.0
> 

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

* Re: [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next
  2015-11-16 13:46   ` [PATCH 3/3] apparmor: " Geliang Tang
  2015-11-18  3:44     ` Serge E. Hallyn
@ 2015-11-18  5:09     ` John Johansen
  1 sibling, 0 replies; 7+ messages in thread
From: John Johansen @ 2015-11-18  5:09 UTC (permalink / raw)
  To: Geliang Tang, James Morris, Serge E. Hallyn
  Cc: linux-security-module, linux-kernel

On 11/16/2015 05:46 AM, Geliang Tang wrote:
> list_next_entry has been defined in list.h, so I replace list_entry_next
> with it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

yep looks good

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

> ---
>  security/apparmor/apparmorfs.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index ad4fa49..7a00bb7 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -550,8 +550,6 @@ fail2:
>  }
>  
>  
> -#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;
>  
> 


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

end of thread, other threads:[~2015-11-18  5:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 13:46 [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next Geliang Tang
2015-11-16 13:46 ` [PATCH 2/3] libceph: " Geliang Tang
2015-11-16 13:46   ` [PATCH 3/3] apparmor: " Geliang Tang
2015-11-18  3:44     ` Serge E. Hallyn
2015-11-18  5:09     ` John Johansen
2015-11-17 16:27   ` [PATCH 2/3] libceph: " Ilya Dryomov
2015-11-16 17:08 ` [PATCH 1/3] misc: mic/scif: " Sudeep Dutt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox