Re: [PATCH v9 09/27] gunyah: rsc_mgr: Add resource manager RPC core
From: Alex Elder <hidden>
Date: 2023-02-06 14:15:06
Also in:
linux-arm-msm, linux-devicetree, linux-doc, lkml
From: Alex Elder <hidden>
Date: 2023-02-06 14:15:06
Also in:
linux-arm-msm, linux-devicetree, linux-doc, lkml
On 2/2/23 5:53 AM, Srinivas Kandagatla wrote:
quoted
+struct gh_rm_rpc_hdr { + u8 api; + u8 type; + __le16 seq; + __le32 msg_id; +} __packed; +#define GH_RM_RPC_HDR_SZ sizeof(struct gh_rm_rpc_hdr) You could use this in most of the places where sizeof is being called.
I'll repeat my point here. I see no value in hiding the size of the structure behind a defined symbol. Use sizeof(*pointer) (if possible) or sizeof(struct foo) in the code; it makes it very clear that it's not something other than a simple object/structure size. -Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel