diff mbox series

soc: qcom: pmic_pdcharger_ulog: fix sparse warnings

Message ID 20231207-topic-sm8x50-upstream-fix-pdcharger-ulog-sparse-v1-1-43f75455a9e3@linaro.org (mailing list archive)
State Superseded
Commit fbfd1f55ad34be14e52b39a1b83ae1f0d29b890c
Headers show
Series soc: qcom: pmic_pdcharger_ulog: fix sparse warnings | expand

Commit Message

Neil Armstrong Dec. 7, 2023, 8:31 a.m. UTC
Fix sparse warning by comverting values to le32() as expected
in the get_ulog_req_msg.hdr struct.

Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312060355.M0eJtq4X-lkp@intel.com/
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/soc/qcom/pmic_pdcharger_ulog.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


---
base-commit: 8e00ce02066e8f6f1ad5eab49a2ede7bf7a5ef64
change-id: 20231207-topic-sm8x50-upstream-fix-pdcharger-ulog-sparse-51a4ca55a6b3

Best regards,

Comments

Andrew Halaney Dec. 7, 2023, 2:50 p.m. UTC | #1
Hey Neil,

On Thu, Dec 07, 2023 at 09:31:54AM +0100, Neil Armstrong wrote:
> Fix sparse warning by comverting values to le32() as expected
> in the get_ulog_req_msg.hdr struct.
> 
> Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312060355.M0eJtq4X-lkp@intel.com/
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>

I already sent this change (among two other small issues I found) over
at:

    https://lore.kernel.org/linux-arm-msm/20231205-pmicpdcharger-ulog-fixups-v1-0-71c95162cb84@redhat.com/

Thanks,
Andrew
diff mbox series

Patch

diff --git a/drivers/soc/qcom/pmic_pdcharger_ulog.c b/drivers/soc/qcom/pmic_pdcharger_ulog.c
index f1aaacf05005..238cd38589dc 100644
--- a/drivers/soc/qcom/pmic_pdcharger_ulog.c
+++ b/drivers/soc/qcom/pmic_pdcharger_ulog.c
@@ -54,9 +54,9 @@  static int pmic_pdcharger_ulog_request(struct pmic_pdcharger_ulog *pg)
 {
 	struct get_ulog_req_msg req_msg = {
 		.hdr = {
-			.owner = MSG_OWNER_CHG_ULOG,
-			.type = MSG_TYPE_REQ_RESP,
-			.opcode = GET_CHG_ULOG_REQ
+			.owner = cpu_to_le32(MSG_OWNER_CHG_ULOG),
+			.type = cpu_to_le32(MSG_TYPE_REQ_RESP),
+			.opcode = cpu_to_le32(GET_CHG_ULOG_REQ)
 		},
 		.log_size = MAX_ULOG_SIZE
 	};