On 6/11/26 11:57, Ilias Apalodimas wrote:
On Wed, 10 Jun 2026 at 13:52, Ludwig Nussel <[email protected]> wrote:
[...]
  /**
diff --git a/include/tpm_tcg2.h b/include/tpm_tcg2.h
index eb6afe49e77..db3f6f486e9 100644
--- a/include/tpm_tcg2.h
+++ b/include/tpm_tcg2.h
@@ -162,12 +162,14 @@ struct tcg_efi_spec_id_event {
   * @log_position:      Current entry position
   * @log_size:          Log space available
   * @found:             Boolean indicating if an existing log was discovered
+ * @allocated:         Boolean indicating that the log was allocated by u-boot
   */
  struct tcg2_event_log {
         u8 *log;
         u32 log_position;
         u32 log_size;
         bool found;
+       bool allocated;
  };

I think it makes more sense to define an eventlog state with a u32 and
replace the found boolean with it. e.g

#define ELOG_FOUND BIT(0)
#define ELOG_ALLOCATED BIT(1) etc

Is there a specific reason why explicit low level bit operations would be preferred? Since the structure is only used as internal data structure of u-boot, what about declaring bits like this:

+       bool found:1;
+       bool allocated:1;

Looks like that style is also used within U-Boot.

cu
Ludwig

--
Ludwig Nussel
Siemens AG
www.siemens.com

Reply via email to