2007-12-06 16:14:02

by cheng renquan

[permalink] [raw]
Subject: [PATCH 18/20] drivers/char/ipmi/ipmi_msghandler.c: use LIST_HEAD instead of LIST_HEAD_INIT

these three list_head are all local variables, but can also use LIST_HEAD.

Signed-off-by: Denis Cheng <[email protected]>
---
drivers/char/ipmi/ipmi_msghandler.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index d01c4ff..32b2b22 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -441,7 +441,7 @@ struct watcher_entry {
int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
{
ipmi_smi_t intf;
- struct list_head to_deliver = LIST_HEAD_INIT(to_deliver);
+ LIST_HEAD(to_deliver);
struct watcher_entry *e, *e2;

mutex_lock(&smi_watchers_mutex);
--
1.5.3.4


2007-12-06 16:14:24

by cheng renquan

[permalink] [raw]
Subject: [PATCH 19/20] drivers/dma/iop-adma.c: use LIST_HEAD instead of LIST_HEAD_INIT

these three list_head are all local variables, but can also use LIST_HEAD.

Signed-off-by: Denis Cheng <[email protected]>
---
drivers/dma/iop-adma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index e5c62b7..b011b5a 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -284,7 +284,7 @@ iop_adma_alloc_slots(struct iop_adma_chan *iop_chan, int num_slots,
int slots_per_op)
{
struct iop_adma_desc_slot *iter, *_iter, *alloc_start = NULL;
- struct list_head chain = LIST_HEAD_INIT(chain);
+ LIST_HEAD(chain);
int slots_found, retry = 0;

/* start search from the last allocated descrtiptor
--
1.5.3.4

2007-12-06 16:14:52

by cheng renquan

[permalink] [raw]
Subject: [PATCH 20/20] net/iucv/iucv.c: use LIST_HEAD instead of LIST_HEAD_INIT

these three list_head are all local variables, but can also use LIST_HEAD.

Signed-off-by: Denis Cheng <[email protected]>
---
net/iucv/iucv.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index 7698f6c..f13fe88 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -1492,7 +1492,7 @@ static void iucv_tasklet_fn(unsigned long ignored)
[0x08] = iucv_message_pending,
[0x09] = iucv_message_pending,
};
- struct list_head task_queue = LIST_HEAD_INIT(task_queue);
+ LIST_HEAD(task_queue);
struct iucv_irq_list *p, *n;

/* Serialize tasklet, iucv_path_sever and iucv_path_connect. */
@@ -1526,7 +1526,7 @@ static void iucv_tasklet_fn(unsigned long ignored)
static void iucv_work_fn(struct work_struct *work)
{
typedef void iucv_irq_fn(struct iucv_irq_data *);
- struct list_head work_queue = LIST_HEAD_INIT(work_queue);
+ LIST_HEAD(work_queue);
struct iucv_irq_list *p, *n;

/* Serialize tasklet, iucv_path_sever and iucv_path_connect. */
--
1.5.3.4

2007-12-07 08:52:09

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 20/20] net/iucv/iucv.c: use LIST_HEAD instead of LIST_HEAD_INIT

From: Denis Cheng <[email protected]>
Date: Fri, 7 Dec 2007 00:13:25 +0800

> these three list_head are all local variables, but can also use LIST_HEAD.
>
> Signed-off-by: Denis Cheng <[email protected]>

Applied.