Same goes for what this patch does, isn't that a bit overkill for what really just needs to be a global variable and a CBMEM_INIT_HOOK?

It only uses a CBMEM_INIT_HOOK if the save function is called before cbmem_init. So it potentially covers more use cases, but it indeed looks like it is overkill atm.

View Change

To view, visit change 36291. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I71bbe1b776cbc74468a6218b315894602b6152ba
Gerrit-Change-Number: 36291
Gerrit-PatchSet: 13
Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Comment-Date: Mon, 28 Oct 2019 22:18:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment