summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 193294c)
raw | patch | inline | side by side (parent: 193294c)
author | Tahhan, Maryam <maryam.tahhan@intel.com> | |
Tue, 23 May 2017 10:02:01 +0000 (11:02 +0100) | ||
committer | Tahhan, Maryam <maryam.tahhan@intel.com> | |
Thu, 6 Jul 2017 13:37:58 +0000 (14:37 +0100) |
Get rid of verbose mcelog_get_dimm() function and use llist_search() instead.
Change-Id: Iccc5c083cf254b82c74f6f77df4a0659ba14282c
Signed-off-by: Tahhan, Maryam <maryam.tahhan@intel.com>
Change-Id: Iccc5c083cf254b82c74f6f77df4a0659ba14282c
Signed-off-by: Tahhan, Maryam <maryam.tahhan@intel.com>
src/mcelog.c | patch | blob | history |
diff --git a/src/mcelog.c b/src/mcelog.c
index 4f3f9b0cf4c0c22dcd7dca6bdbe3c1aff9555b1f..654305d3701b14c6f66270b6ac21266626bef9f3 100644 (file)
--- a/src/mcelog.c
+++ b/src/mcelog.c
}
-static llentry_t *mcelog_get_dimm(const char *name, llist_t *dimms_list) {
- if (dimms_list == NULL)
- return NULL;
-
- llentry_t *le = llist_search(g_mcelog_config.dimms_list, name);
- if (le != NULL)
- return le;
-
- return NULL;
-}
-
/* Create or get dimm by dimm name/location */
static llentry_t *mcelog_dimm(const mcelog_memory_rec_t *rec,
llist_t *dimms_list) {
} else
sstrncpy(dimm_name, rec->location, sizeof(dimm_name));
- llentry_t *dimm_le = mcelog_get_dimm(dimm_name, dimms_list);
+ llentry_t *dimm_le = llist_search(g_mcelog_config.dimms_list, dimm_name);
if (dimm_le == NULL) {
mcelog_memory_rec_t *dimm_mr = calloc(1, sizeof(*dimm_mr));