All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH u-boot v2019.04-aspeed-openbmc] otp: Reduce size of struct otpkey
@ 2022-07-14  7:45 Joel Stanley
  2022-07-16  9:08 ` Zev Weiss
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Stanley @ 2022-07-14  7:45 UTC (permalink / raw)
  To: openbmc, Cédric Le Goater

Don't store more information than is used.

  Function                                     old     new   delta
  _otp_print_key                               540     580     +40
  otp_verify_boot_image                       1336    1328      -8
  a2_key_type                                  640      40    -600
  a1_key_type                                  640      40    -600
  a3_key_type                                 1024      64    -960
  a0_key_type                                 1024      64    -960
  Total: Before=279318, After=276230, chg -1.11%

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 cmd/otp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/cmd/otp.c b/cmd/otp.c
index 049c217d6048..6dd2d2bdfb17 100644
--- a/cmd/otp.c
+++ b/cmd/otp.c
@@ -133,11 +133,11 @@ struct otpstrap_status {
 };
 
 struct otpkey_type {
-	int value;
-	int key_type;
-	int order;
-	int need_id;
-	char information[110];
+	int value: 4;
+	int key_type: 4;
+	int order: 1;
+	int need_id: 1;
+	char *information;
 };
 
 struct otp_pro_sts {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-16  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-14  7:45 [PATCH u-boot v2019.04-aspeed-openbmc] otp: Reduce size of struct otpkey Joel Stanley
2022-07-16  9:08 ` Zev Weiss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.