Marc-André Lureau <marcandre.lur...@gmail.com> writes: > Hi > > On Thu, Aug 24, 2017 at 10:45 AM, Markus Armbruster <arm...@redhat.com> wrote: >> We have a strict separation between enum TpmModel and tpm_models[]: >> >> * TpmModel may have any number of members. It just happens to have one. >> >> * tpm_register_model() uses the first empty slot in tmp_models[]. >> >> If you register more than tpm_models[] has space, >> tpn_register_model() fails. Its caller silently ignores the >> failure. > > tpm_
Will fix. >> >> Register the same TpmModel more than once has no effect other than >> wasting tpm_models[] slots: tpm_model_is_registered() is happy with >> the first one it finds. >> >> Since we only ever register one model, and tpm_models[] has space for >> just that one, this contraption even works. >> >> Turn tpm_models[] into a straight map from enum TpmType to bool. Much >> simpler. >> >> Cc: Stefan Berger <stef...@us.ibm.com> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> > > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Thanks! [...]