Re: [PATCH v1 1/3] rpmb: move rpmb_frame struct and constants to common header

From: Bart Van Assche

Date: Tue Sep 23 2025 - 16:28:53 EST


On 9/23/25 8:39 AM, Bean Huo wrote:
+struct rpmb_frame {
+ u8 stuff[196];
+ u8 key_mac[32];
+ u8 data[256];
+ u8 nonce[16];
+ __be32 write_counter __packed;
+ __be16 addr __packed;
+ __be16 block_count __packed;
+ __be16 result __packed;
+ __be16 req_resp __packed;
+};

I think that it is safe to remove __packed from the above structure
members since the size of the first four members is a multiple of four
(196 + 32 + 256 + 16) and that is sufficient not to introduce any gaps
between the __be* members.

Thanks,

Bart.