All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Eilon Greenstein <eilong@broadcom.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] list: introduce list_next/prev_entry
Date: Sun, 10 Nov 2013 17:59:47 +0100	[thread overview]
Message-ID: <20131110165947.GA32758@redhat.com> (raw)

Hello.

Not sure who maintains list.h, hopefully this is -mm material.

It is really annoying that we do not have list_next/prev_entry,
they can have a lot of users, including list.h itself.

And in fact list_next_entry() is already defined in events/core.c
and bnx2x_sp.c, this proves that it is really handy. That is why
1/4 comes as a separate patch because it touches the code outside
of list.h.

3/4 is minor, but I think makes sense anyway.

4/4 is just the random example of usage outside of list.h,
list_entry(child->d_u.d_child.next, struct dentry, d_u.d_child)
is hardly readable.

None of this patches changes the compiled code.

Oleg.

 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c |    3 -
 fs/debugfs/inode.c                             |    3 +-
 include/linux/list.h                           |   79 ++++++++++++++++--------
 kernel/events/core.c                           |    3 -
 4 files changed, 54 insertions(+), 34 deletions(-)


             reply	other threads:[~2013-11-10 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 16:59 Oleg Nesterov [this message]
2013-11-10 17:00 ` [PATCH 1/4] list: introduce list_next_entry() and list_prev_entry() Oleg Nesterov
2013-11-10 17:00 ` [PATCH 2/4] list: change list_for_each_entry*() to use list_*_entry() Oleg Nesterov
2013-11-10 17:00 ` [PATCH 3/4] list: introduce list_last_entry(), use list_{first,last}_entry() Oleg Nesterov
2013-11-10 17:00 ` [PATCH 4/4] debugfs: use list_next_entry() in debugfs_remove_recursive() Oleg Nesterov

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=20131110165947.GA32758@redhat.com \
    --to=oleg@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=eilong@broadcom.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.