firmware: arm_scmi: Avoid padding in sensor message structure
authorCristian Marussi <cristian.marussi@arm.com>
Mon, 28 Jun 2021 17:00:42 +0000 (18:00 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 13 Jul 2021 10:42:14 +0000 (11:42 +0100)
commit187a002b07e8089f0b5657eafec50b5d05625569
tree676f75c2472a0dde7ce3359cfe134ded860587a3
parentb98cf55ec0bd88bdba725845c743e94ecaf57b7e
firmware: arm_scmi: Avoid padding in sensor message structure

scmi_resp_sensor_reading_complete structure is meant to represent an
SCMI asynchronous reading complete message. The readings field with
a 64bit type forces padding and breaks reads in scmi_sensor_reading_get.

Split it in two adjacent 32bit readings_low/high subfields to avoid the
padding within the structure. Alternatively we could to mark the structure
packed.

Link: https://lore.kernel.org/r/20210628170042.34105-1-cristian.marussi@arm.com
Fixes: e2083d3673916 ("firmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/sensors.c