firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 11 Nov 2019 16:25:22 +0000 (16:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jan 2020 09:01:07 +0000 (10:01 +0100)
commit8b8b5f9a7b3b6295325e0252c31c4947f8ed5b5c
tree39dbaa97aed0444de61db0e0a833f0a66d3cd33f
parent83ff921a5e891a22e8b4ac1d0dfbb478de3691e8
firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT

[ Upstream commit 7bd39bc6bfdf96f5df0f92199bbc1a3ee2f2adb8 ]

The logic to ring the scmi performance fastchannel ignores the
value read from the doorbell register in case of !CONFIG_64BIT.
This bug also shows up as warning with '-Wunused-but-set-variable' gcc
flag:

drivers/firmware/arm_scmi/perf.c: In function scmi_perf_fc_ring_db:
drivers/firmware/arm_scmi/perf.c:323:7: warning: variable val set but
not used [-Wunused-but-set-variable]

Fix the same by aligning the logic with CONFIG_64BIT as used in the
macro SCMI_PERF_FC_RING_DB().

Fixes: 823839571d76 ("firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol")
Reported-by: Hulk Robot <hulkci@huawei.com>
Reported-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/arm_scmi/perf.c