[coreboot-gerrit] Patch merged into coreboot/master: 9a8e3eb elog: Get rid of the descriptor type and some unnecessary wrappers
gerrit at coreboot.org
gerrit at coreboot.org
Mon Dec 2 15:18:07 CET 2013
the following patch was just integrated into master:
commit 9a8e3eb5d6e4e777b658f3b97bcb41794fe6f42a
Author: Gabe Black <gabeblack at google.com>
Date: Fri Apr 26 03:34:00 2013 -0700
elog: Get rid of the descriptor type and some unnecessary wrappers
There was always exactly one elog descriptor declared and initialized, but its
contents were being accessed through a pointer that was passed back and forth
between functions instead of being accessed directly. This made the code more
verbose than it needed to be and harder to follow. To address this the
descriptor type was eliminated, its contents were turned into individual
global variables, and various functions were adjusted to no longer take the
descriptor as an argument.
Similarly, the code was more verbose and complicated than it needed to be
because of several wrapper functions which wrapped a single line of code which
called an underlying function with particular arguments and were only used
once. This makes it harder to tell what the code is doing because the call to
the real function you may already be familiar with is obscured behind a
new function you've never seen before. It also adds one more text to the file
as a whole while providing at best a marginal benefit. Those functions were
removed and their callers now call their contents directly.
Built and booted on Link. Ran mosys eventlog list. Cleared the event log
and ran mosys eventlog list again. Added 2000 events and ran mosys eventlog
list. Cleared the log again and ran mosys eventlog list.
Change-Id: I4f5f6b9f4f508548077b7f5a92f4322db99e01ca
Signed-off-by: Gabe Black <gabeblack at google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49310
Reviewed-by: Duncan Laurie <dlaurie at chromium.org>
Commit-Queue: Gabe Black <gabeblack at chromium.org>
Tested-by: Gabe Black <gabeblack at chromium.org>
See http://review.coreboot.org/4245 for details.
-gerrit
More information about the coreboot-gerrit
mailing list