From: Sudeep Dutt <sudeep.dutt@intel.com>
To: Geliang Tang <geliangtang@163.com>
Cc: Sudeep Dutt <sudeep.dutt@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next
Date: Mon, 16 Nov 2015 09:08:19 -0800 [thread overview]
Message-ID: <1447693699.93285.515.camel@localhost> (raw)
In-Reply-To: <6a47dadb3a625d7f5b20b4e98bb8af4d30db66a3.1447681244.git.geliangtang@163.com>
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);
> }
prev parent reply other threads:[~2015-11-16 17:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Sudeep Dutt [this message]
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=1447693699.93285.515.camel@localhost \
--to=sudeep.dutt@intel.com \
--cc=geliangtang@163.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.