* [PATCH 07/20] drivers/edac/: use LIST_HEAD instead of LIST_HEAD_INIT
@ 2007-12-05 19:19 Denis Cheng
2007-12-05 20:55 ` Doug Thompson
0 siblings, 1 reply; 3+ messages in thread
From: Denis Cheng @ 2007-12-05 19:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
drivers/edac/edac_device.c | 2 +-
drivers/edac/edac_mc.c | 2 +-
drivers/edac/edac_pci.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index f3690a6..6f0b522 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -36,7 +36,7 @@
* is protected by the 'device_ctls_mutex' lock
*/
static DEFINE_MUTEX(device_ctls_mutex);
-static struct list_head edac_device_list = LIST_HEAD_INIT(edac_device_list);
+static LIST_HEAD(edac_device_list);
#ifdef CONFIG_EDAC_DEBUG
static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 063a1bf..9cd778f 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -36,7 +36,7 @@
/* lock to memory controller's control array */
static DEFINE_MUTEX(mem_ctls_mutex);
-static struct list_head mc_devices = LIST_HEAD_INIT(mc_devices);
+static LIST_HEAD(mc_devices);
#ifdef CONFIG_EDAC_DEBUG
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index 5dee9f5..dabba2d 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -29,7 +29,7 @@
#include "edac_module.h"
static DEFINE_MUTEX(edac_pci_ctls_mutex);
-static struct list_head edac_pci_list = LIST_HEAD_INIT(edac_pci_list);
+static LIST_HEAD(edac_pci_list);
/*
* edac_pci_alloc_ctl_info
--
1.5.3.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 07/20] drivers/edac/: use LIST_HEAD instead of LIST_HEAD_INIT
2007-12-05 19:19 [PATCH 07/20] drivers/edac/: use LIST_HEAD instead of LIST_HEAD_INIT Denis Cheng
@ 2007-12-05 20:55 ` Doug Thompson
0 siblings, 0 replies; 3+ messages in thread
From: Doug Thompson @ 2007-12-05 20:55 UTC (permalink / raw)
To: Denis Cheng, Greg Kroah-Hartman; +Cc: linux-kernel
ACK: Doug Thompson <dougthompson@xmission.com>
--- Denis Cheng <crquan@gmail.com> wrote:
> single list_head variable initialized with LIST_HEAD_INIT could almost
> always can be replaced with LIST_HEAD declaration, this shrinks the code
> and looks better.
>
> Signed-off-by: Denis Cheng <crquan@gmail.com>
> ---
> drivers/edac/edac_device.c | 2 +-
> drivers/edac/edac_mc.c | 2 +-
> drivers/edac/edac_pci.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
> index f3690a6..6f0b522 100644
> --- a/drivers/edac/edac_device.c
> +++ b/drivers/edac/edac_device.c
> @@ -36,7 +36,7 @@
> * is protected by the 'device_ctls_mutex' lock
> */
> static DEFINE_MUTEX(device_ctls_mutex);
> -static struct list_head edac_device_list = LIST_HEAD_INIT(edac_device_list);
> +static LIST_HEAD(edac_device_list);
>
> #ifdef CONFIG_EDAC_DEBUG
> static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
> diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
> index 063a1bf..9cd778f 100644
> --- a/drivers/edac/edac_mc.c
> +++ b/drivers/edac/edac_mc.c
> @@ -36,7 +36,7 @@
>
> /* lock to memory controller's control array */
> static DEFINE_MUTEX(mem_ctls_mutex);
> -static struct list_head mc_devices = LIST_HEAD_INIT(mc_devices);
> +static LIST_HEAD(mc_devices);
>
> #ifdef CONFIG_EDAC_DEBUG
>
> diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
> index 5dee9f5..dabba2d 100644
> --- a/drivers/edac/edac_pci.c
> +++ b/drivers/edac/edac_pci.c
> @@ -29,7 +29,7 @@
> #include "edac_module.h"
>
> static DEFINE_MUTEX(edac_pci_ctls_mutex);
> -static struct list_head edac_pci_list = LIST_HEAD_INIT(edac_pci_list);
> +static LIST_HEAD(edac_pci_list);
>
> /*
> * edac_pci_alloc_ctl_info
> --
> 1.5.3.4
>
W1DUG
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 07/20] drivers/edac/: use LIST_HEAD instead of LIST_HEAD_INIT
@ 2007-12-05 19:20 Denis Cheng
0 siblings, 0 replies; 3+ messages in thread
From: Denis Cheng @ 2007-12-05 19:20 UTC (permalink / raw)
To: Doug Thompson; +Cc: linux-kernel
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
drivers/edac/edac_device.c | 2 +-
drivers/edac/edac_mc.c | 2 +-
drivers/edac/edac_pci.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index f3690a6..6f0b522 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -36,7 +36,7 @@
* is protected by the 'device_ctls_mutex' lock
*/
static DEFINE_MUTEX(device_ctls_mutex);
-static struct list_head edac_device_list = LIST_HEAD_INIT(edac_device_list);
+static LIST_HEAD(edac_device_list);
#ifdef CONFIG_EDAC_DEBUG
static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 063a1bf..9cd778f 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -36,7 +36,7 @@
/* lock to memory controller's control array */
static DEFINE_MUTEX(mem_ctls_mutex);
-static struct list_head mc_devices = LIST_HEAD_INIT(mc_devices);
+static LIST_HEAD(mc_devices);
#ifdef CONFIG_EDAC_DEBUG
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index 5dee9f5..dabba2d 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -29,7 +29,7 @@
#include "edac_module.h"
static DEFINE_MUTEX(edac_pci_ctls_mutex);
-static struct list_head edac_pci_list = LIST_HEAD_INIT(edac_pci_list);
+static LIST_HEAD(edac_pci_list);
/*
* edac_pci_alloc_ctl_info
--
1.5.3.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-05 20:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-05 19:19 [PATCH 07/20] drivers/edac/: use LIST_HEAD instead of LIST_HEAD_INIT Denis Cheng
2007-12-05 20:55 ` Doug Thompson
2007-12-05 19:20 Denis Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®