]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Remove all the unused local variables
authorCristian Marussi <cristian.marussi@arm.com>
Mon, 30 May 2022 11:52:36 +0000 (12:52 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 6 Jun 2022 14:47:04 +0000 (15:47 +0100)
commit601813b3cb6998ae7ecd30f4475c6d6722441f43
treec546e11ea0d7f8af04db47c40c3b8f469cb07960
parent96d54595db73d0efdeafeac0f712e86f95841bfc
firmware: arm_scmi: Remove all the unused local variables

While using SCMI iterators helpers a few local automatic variables are
defined but then used only as input for sizeof operators.

cppcheck is fooled to complain about this with:

 | drivers/firmware/arm_scmi/sensors.c:341:48: warning: Variable 'msg' is
 | not assigned a value. [unassignedVariable]
 |  struct scmi_msg_sensor_list_update_intervals *msg;

Even though this is an innocuos warning, since the uninitialized variable
is at the end never used in the reported cases, fix these occurences all
over SCMI stack to avoid keeping unneeded objects on the stack.

Link: https://lore.kernel.org/r/20220530115237.277077-1-cristian.marussi@arm.com
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/clock.c
drivers/firmware/arm_scmi/perf.c
drivers/firmware/arm_scmi/sensors.c
drivers/firmware/arm_scmi/voltage.c