linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: arm_scmi: Fix type error assignment in voltage protocol
@ 2021-11-15 15:40 Cristian Marussi
  2021-11-15 15:40 ` [PATCH] firmware: arm_scmi: Fix type error in sensor protocol Cristian Marussi
  2021-11-18 12:12 ` [PATCH] firmware: arm_scmi: Fix type error assignment in voltage protocol Sudeep Holla
  0 siblings, 2 replies; 4+ messages in thread
From: Cristian Marussi @ 2021-11-15 15:40 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: sudeep.holla, Cristian Marussi

Fix incorrect type assignment error reported by sparse as:

drivers/firmware/arm_scmi/voltage.c:159:42: warning: incorrect type in assignment (different base types)
drivers/firmware/arm_scmi/voltage.c:159:42: expected restricted __le32 [usertype] level_index
drivers/firmware/arm_scmi/voltage.c:159:42: got unsigned int [usertype] desc_index

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 2add5cacff353 ("firmware: arm_scmi: Add voltage domain management protocol support")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 drivers/firmware/arm_scmi/voltage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c
index a5048956a0be..ac08e819088b 100644
--- a/drivers/firmware/arm_scmi/voltage.c
+++ b/drivers/firmware/arm_scmi/voltage.c
@@ -156,7 +156,7 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph,
 			int cnt;
 
 			cmd->domain_id = cpu_to_le32(v->id);
-			cmd->level_index = desc_index;
+			cmd->level_index = cpu_to_le32(desc_index);
 			ret = ph->xops->do_xfer(ph, tl);
 			if (ret)
 				break;
-- 
2.17.1


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

end of thread, other threads:[~2021-11-18 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 15:40 [PATCH] firmware: arm_scmi: Fix type error assignment in voltage protocol Cristian Marussi
2021-11-15 15:40 ` [PATCH] firmware: arm_scmi: Fix type error in sensor protocol Cristian Marussi
2021-11-18 12:11   ` Sudeep Holla
2021-11-18 12:12 ` [PATCH] firmware: arm_scmi: Fix type error assignment in voltage protocol Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).