[PATCH u-boot v2019.04-aspeed-openbmc] otp: Reduce size of struct otpkey
Joel Stanley
joel at jms.id.au
Thu Jul 14 17:45:52 AEST 2022
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 at 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
More information about the openbmc
mailing list