diff options
author | Mukesh Ojha <quic_mojha@quicinc.com> | 2023-01-31 21:31:06 +0530 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2023-02-14 08:40:33 -0800 |
commit | 2554dd0ac362738f588ba073d8333eb9b14f9587 (patch) | |
tree | 5ff967a5f782988c6fdef49e7f99495d3c3e5b31 /drivers/remoteproc/qcom_common.c | |
parent | 9d5b9ad97f83b2390a6006eeb5ae5e48ec4298ce (diff) |
remoteproc: qcom: fix sparse warnings
This patch try to address below sparse warnings.
drivers/remoteproc/qcom_common.c:126:27: warning: restricted __le32 degrades to integer
drivers/remoteproc/qcom_common.c:133:32: warning: cast to restricted __le32
drivers/remoteproc/qcom_common.c:133:32: warning: cast from restricted __le64
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1675180866-16695-1-git-send-email-quic_mojha@quicinc.com
Diffstat (limited to 'drivers/remoteproc/qcom_common.c')
-rw-r--r-- | drivers/remoteproc/qcom_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index 7810f91d3080..abf66c6876df 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -123,14 +123,14 @@ static int qcom_add_minidump_segments(struct rproc *rproc, struct minidump_subsy for (i = 0; i < seg_cnt; i++) { memcpy_fromio(®ion, ptr + i, sizeof(region)); - if (region.valid == MD_REGION_VALID) { + if (le32_to_cpu(region.valid) == MD_REGION_VALID) { name = kstrndup(region.name, MAX_REGION_NAME_LENGTH - 1, GFP_KERNEL); if (!name) { iounmap(ptr); return -ENOMEM; } da = le64_to_cpu(region.address); - size = le32_to_cpu(region.size); + size = le64_to_cpu(region.size); rproc_coredump_add_custom_segment(rproc, da, size, NULL, name); } } |