]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: qcom: QMI encoding/decoding for big endian
authorAlexander Wilhelm <alexander.wilhelm@westermo.com>
Thu, 22 May 2025 14:35:29 +0000 (16:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:41 +0000 (12:08 +0200)
commit603df70062fbead8e12578413f0de111159bf6e3
tree8268440dabcce7e789dfbb8b1b83bcbbb6a7c2e6
parent41917d9ce43a53f71088c6b274af0d8479b0befa
soc: qcom: QMI encoding/decoding for big endian

[ Upstream commit 3ced38da5f7de4c260f9eaa86fc805827953243a ]

The QMI_DATA_LEN type may have different sizes. Taking the element's
address of that type and interpret it as a smaller sized ones works fine
for little endian platforms but not for big endian ones. Instead use
temporary variables of smaller sized types and cast them correctly to
support big endian platforms.

Signed-off-by: Alexander Wilhelm <alexander.wilhelm@westermo.com>
Fixes: 9b8a11e82615 ("soc: qcom: Introduce QMI encoder/decoder")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250522143530.3623809-2-alexander.wilhelm@westermo.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/qcom/qmi_encdec.c