]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Remove unneeded NULL termination of clk name
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 30 Mar 2022 15:05:37 +0000 (16:05 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Thu, 28 Apr 2022 17:22:51 +0000 (18:22 +0100)
commit9fcad109026ca3e8b85d419f062c6b1f72149ae5
treee6dd619536b9fcf59fa14ae94f341190f463714c
parentd94f125ce7d39772c3e64db1af6e1fd354a8cc25
firmware: arm_scmi: Remove unneeded NULL termination of clk name

The string array 'name' inside struct scmi_clock_info holds the clock name
which was successfully retrieved by querying the SCMI platform, unless the
related underlying SCMI command failed.

Anyway, such scmi_clock_info structure is allocated using devm_kcalloc()
which in turn internally appends a __GFP_ZERO flag to its invocation:
as a consequence the string 'name' field does not need to be zeroed when
we fail to get the clock name via SCMI, it is already NULL terminated.

Remove unneeded explicit NULL termination.

Link: https://lore.kernel.org/r/20220330150551.2573938-9-cristian.marussi@arm.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