From: Ethan Tidmore <ethantidmore06@gmail.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Ethan Tidmore <ethantidmore06@gmail.com>
Subject: [PATCH] soc: qcom: smem: Fix signedness bug
Date: Mon, 17 Aug 2026 21:34:41 -0500 [thread overview]
Message-ID: <20260818023441.891274-1-ethantidmore06@gmail.com> (raw)
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
next reply other threads:[~2026-08-18 2:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 2:34 Ethan Tidmore [this message]
2026-08-18 8:38 ` [PATCH] soc: qcom: smem: Fix signedness bug Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260818023441.891274-1-ethantidmore06@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=andersson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.