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 11:24:59 +0200 [thread overview]
Message-ID: <20121127092458.GO3867@intel.com> (raw)
In-Reply-To: <1354007025-8334-1-git-send-email-andriy.shevchenko@linux.intel.com>
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?
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/acpi/resource.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> index 4107c00..a3868f6 100644
> --- a/drivers/acpi/resource.c
> +++ b/drivers/acpi/resource.c
> @@ -426,7 +426,6 @@ static acpi_status acpi_dev_new_resource_entry(struct resource *r,
> c->error = -ENOMEM;
> return AE_NO_MEMORY;
> }
> - INIT_LIST_HEAD(&rentry->node);
> rentry->res = *r;
> list_add_tail(&rentry->node, c->list);
> c->count++;
> --
> 1.7.10.4
next prev parent reply other threads:[~2012-11-27 9:22 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 [this message]
2012-11-27 9:49 ` Andy Shevchenko
2012-11-27 10:05 ` Westerberg, Mika
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=20121127092458.GO3867@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.