drivers/edac/: use LIST_HEAD instead of LIST_HEAD_INIT
PATCH 7/20 drivers/edac/: use LIST_HEAD instead of LIST_HEAD_INIT
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 <[email protected]>
--- 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(-)
drivers/edac/edac_device.c +1 -1
@@ -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)
drivers/edac/edac_mc.c +1 -1
@@ -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
drivers/edac/edac_pci.c +1 -1
@@ -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
Signature · 1 line
1.5.3.4
ACK: Doug Thompson <[email protected]>
Quoted 53 lines · --- Denis Cheng
single
list_headvariable initialized withLIST_HEAD_INITcould almost always can be replaced withLIST_HEADdeclaration, this shrinks the code and looks better.Signed-off-by Denis Cheng <[email protected]>--- 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(-)drivers/edac/edac_device.c +1
-1@@ -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)drivers/edac/edac_mc.c +1
-1@@ -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 drivers/edac/edac_pci.c +1
-1@@ -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 Signature · 1 line
1.5.3.4
W1DUG