All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set
@ 2017-08-21 15:36 ` Sudeep Holla
  0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2017-08-21 15:36 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: Sudeep Holla, Arnd Bergmann

scpi_device_{g,s}et_power_state correctly handles the conversion of
endianness for dev_id using cpu_to_le16. However dev_id is declared
as u16 in struct dev_pstate_set which is incorrect.

This patch fixes the endianness of dev_id in dev_pstate_set structure.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/arm_scpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Arnd,

Can you pick up this fix for v4.14 directly ? I can send a pull request
if required.

Regards,
Sudeep

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 8043e51de897..ab52f1bcd277 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -357,7 +357,7 @@ struct sensor_value {
 } __packed;

 struct dev_pstate_set {
-	u16 dev_id;
+	__le16 dev_id;
 	u8 pstate;
 } __packed;

--
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set
@ 2017-08-21 15:36 ` Sudeep Holla
  0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2017-08-21 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

scpi_device_{g,s}et_power_state correctly handles the conversion of
endianness for dev_id using cpu_to_le16. However dev_id is declared
as u16 in struct dev_pstate_set which is incorrect.

This patch fixes the endianness of dev_id in dev_pstate_set structure.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/arm_scpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Arnd,

Can you pick up this fix for v4.14 directly ? I can send a pull request
if required.

Regards,
Sudeep

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 8043e51de897..ab52f1bcd277 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -357,7 +357,7 @@ struct sensor_value {
 } __packed;

 struct dev_pstate_set {
-	u16 dev_id;
+	__le16 dev_id;
 	u8 pstate;
 } __packed;

--
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-21 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 15:36 [PATCH] firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set Sudeep Holla
2017-08-21 15:36 ` Sudeep Holla

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.