All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Westerberg, Mika" <mika.westerberg@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI: remove unnecessary INIT_LIST_HEAD
Date: Tue, 27 Nov 2012 12:05:55 +0200	[thread overview]
Message-ID: <20121127100555.GP3867@intel.com> (raw)
In-Reply-To: <1354009761.20110.61.camel@smile>

On Tue, Nov 27, 2012 at 11:49:21AM +0200, Andy Shevchenko wrote:
> On Tue, 2012-11-27 at 11:24 +0200, Westerberg, Mika wrote: 
> > On Tue, Nov 27, 2012 at 11:03:45AM +0200, Andy Shevchenko wrote:
> > > There is no need to initialize the node before appending it to the list.
> > 
> > I might be missing something but why do we then have macros like:
> > list_del_init() etc?
> 
> list_del_init(&list->node) allows to reuse &list->node as a new list.
> I guess the often use case of that when you extract the leaf node from
> the list of lists and create a new list based on it.
> 
> In our case we just add a node to the existed list.

OK. Thanks for the explanation.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

  reply	other threads:[~2012-11-27 10:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  9:03 [PATCH] ACPI: remove unnecessary INIT_LIST_HEAD Andy Shevchenko
2012-11-27  9:24 ` Westerberg, Mika
2012-11-27  9:49   ` Andy Shevchenko
2012-11-27 10:05     ` Westerberg, Mika [this message]
2012-11-27 19:10       ` Rafael J. Wysocki

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=20121127100555.GP3867@intel.com \
    --to=mika.westerberg@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /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.