From: Cristian Marussi <cristian.marussi@arm.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, cristian.marussi@arm.com Subject: [PATCH 4/4] firmware: arm_scmi: Remove fixed size typing from event reports Date: Wed, 8 Jul 2020 13:22:48 +0100 [thread overview] Message-ID: <20200708122248.52771-4-cristian.marussi@arm.com> (raw) In-Reply-To: <20200708122248.52771-1-cristian.marussi@arm.com> Event reports are used to convey information describing events to the registered user-callbacks: they are necessarily derived from the underlying raw SCMI events' messages but they are not meant to expose or directly mirror any of those messages data layout, which belong to the protocol layer. Using fixed size fields mirroring messages structure is at odd with this: get rid of them using more generic, equivalent, typing. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> --- include/linux/scmi_protocol.h | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 7d4348fb7330..e51f392f464b 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -381,47 +381,47 @@ enum scmi_notification_events { }; struct scmi_power_state_changed_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 power_state; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int power_state; }; struct scmi_perf_limits_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 range_max; - u32 range_min; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int range_max; + unsigned int range_min; }; struct scmi_perf_level_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 performance_level; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int performance_level; }; struct scmi_sensor_trip_point_report { - u64 timestamp; - u32 agent_id; - u32 sensor_id; - u32 trip_point_desc; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int sensor_id; + unsigned int trip_point_desc; }; struct scmi_reset_issued_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 reset_state; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int reset_state; }; struct scmi_base_error_report { - u64 timestamp; - u32 agent_id; - bool fatal; - u16 cmd_count; - u64 reports[]; + unsigned long long timestamp; + unsigned int agent_id; + bool fatal; + unsigned int cmd_count; + unsigned long long reports[]; }; #endif /* _LINUX_SCMI_PROTOCOL_H */ -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Cristian Marussi <cristian.marussi@arm.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: cristian.marussi@arm.com, sudeep.holla@arm.com Subject: [PATCH 4/4] firmware: arm_scmi: Remove fixed size typing from event reports Date: Wed, 8 Jul 2020 13:22:48 +0100 [thread overview] Message-ID: <20200708122248.52771-4-cristian.marussi@arm.com> (raw) In-Reply-To: <20200708122248.52771-1-cristian.marussi@arm.com> Event reports are used to convey information describing events to the registered user-callbacks: they are necessarily derived from the underlying raw SCMI events' messages but they are not meant to expose or directly mirror any of those messages data layout, which belong to the protocol layer. Using fixed size fields mirroring messages structure is at odd with this: get rid of them using more generic, equivalent, typing. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> --- include/linux/scmi_protocol.h | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 7d4348fb7330..e51f392f464b 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -381,47 +381,47 @@ enum scmi_notification_events { }; struct scmi_power_state_changed_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 power_state; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int power_state; }; struct scmi_perf_limits_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 range_max; - u32 range_min; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int range_max; + unsigned int range_min; }; struct scmi_perf_level_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 performance_level; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int performance_level; }; struct scmi_sensor_trip_point_report { - u64 timestamp; - u32 agent_id; - u32 sensor_id; - u32 trip_point_desc; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int sensor_id; + unsigned int trip_point_desc; }; struct scmi_reset_issued_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 reset_state; + unsigned long long timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int reset_state; }; struct scmi_base_error_report { - u64 timestamp; - u32 agent_id; - bool fatal; - u16 cmd_count; - u64 reports[]; + unsigned long long timestamp; + unsigned int agent_id; + bool fatal; + unsigned int cmd_count; + unsigned long long reports[]; }; #endif /* _LINUX_SCMI_PROTOCOL_H */ -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-08 12:23 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-08 12:22 [PATCH 1/4] firmware: arm_scmi: Remove zero-length array in SCMI Notifications Cristian Marussi 2020-07-08 12:22 ` Cristian Marussi 2020-07-08 12:22 ` [PATCH 2/4] firmware: arm_scmi: Remove unneeded __packed attribute Cristian Marussi 2020-07-08 12:22 ` Cristian Marussi 2020-07-08 12:22 ` [PATCH 3/4] firmware: arm_scmi: Fix scmi_event_header fields typing Cristian Marussi 2020-07-08 12:22 ` Cristian Marussi 2020-07-08 20:38 ` Arnd Bergmann 2020-07-08 20:38 ` Arnd Bergmann 2020-07-09 8:24 ` Cristian Marussi 2020-07-09 8:24 ` Cristian Marussi 2020-07-08 12:22 ` Cristian Marussi [this message] 2020-07-08 12:22 ` [PATCH 4/4] firmware: arm_scmi: Remove fixed size typing from event reports Cristian Marussi 2020-07-08 20:39 ` Arnd Bergmann 2020-07-08 20:39 ` Arnd Bergmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200708122248.52771-4-cristian.marussi@arm.com \ --to=cristian.marussi@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=sudeep.holla@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.