* [PATCH] soc: qcom: smem: Fix signedness bug
@ 2026-08-18 2:34 Ethan Tidmore
2026-08-18 8:38 ` Konrad Dybcio
0 siblings, 1 reply; 2+ messages in thread
From: Ethan Tidmore @ 2026-08-18 2:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel, Ethan Tidmore
The function smem_dram_infer_struct_version() returns negative error
codes and 'ver' is an enum, which makes subsequent condition (ver < 0)
always impossible.
Fixes: 1d234eeafc56a ("soc: qcom: smem: Expose DDR data from SMEM")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
drivers/soc/qcom/smem_dramc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/smem_dramc.c b/drivers/soc/qcom/smem_dramc.c
index 63ebe7f6db59..3a3d2f8f1775 100644
--- a/drivers/soc/qcom/smem_dramc.c
+++ b/drivers/soc/qcom/smem_dramc.c
@@ -371,10 +371,10 @@ DEFINE_SHOW_ATTRIBUTE(smem_hbb);
struct dentry *smem_dram_parse(struct qcom_smem *smem, struct device *dev)
{
struct dentry *debugfs_dir;
- enum ddr_info_version ver;
struct smem_dram *dram;
size_t actual_size;
void *data;
+ int ver;
/* No need to check qcom_smem_is_available(), this func is called by the SMEM driver */
data = __qcom_smem_get(smem, QCOM_SMEM_HOST_ANY, SMEM_DDR_INFO_ID, &actual_size);
--
Thanks,
ET
https://github.com/sponsors/ethantidmore
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-18 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 2:34 [PATCH] soc: qcom: smem: Fix signedness bug Ethan Tidmore
2026-08-18 8:38 ` Konrad Dybcio
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.