From: Christian Marangi <ansuelsmth@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Subject: Re: [bug report] soc: qcom: smem: better track SMEM uninitialized state
Date: Fri, 21 Nov 2025 09:55:50 +0100 [thread overview]
Message-ID: <69202917.7b0a0220.234ce9.9e36@mx.google.com> (raw)
In-Reply-To: <aSAnR3ECa04CoPqp@stanley.mountain>
On Fri, Nov 21, 2025 at 11:48:07AM +0300, Dan Carpenter wrote:
> Hello Christian Marangi,
>
> Commit 7a94d5f31b54 ("soc: qcom: smem: better track SMEM
> uninitialized state") from Oct 31, 2025 (linux-next), leads to the
> following Smatch static checker warning:
>
> drivers/soc/qcom/smem.c:519 qcom_smem_alloc()
> warn: '__smem' can also be NULL
>
> drivers/soc/qcom/smem.c
> 509 int qcom_smem_alloc(unsigned host, unsigned item, size_t size)
> 510 {
> 511 struct smem_partition *part;
> 512 unsigned long flags;
> 513 int ret;
> 514
> 515 if (IS_ERR(__smem))
> 516 return PTR_ERR(__smem);
>
> We recently changed this from being NULL at the start to being -EPROBE_DEFER
> but the qcom_smem_remove() function still sets it to NULL and the
> qcom_smem_is_available() still expects it to be NULL at the start so it
> needs to be updated as well.
>
> 517
> 518 if (item < SMEM_ITEM_LAST_FIXED) {
> --> 519 dev_err(__smem->dev,
> 520 "Rejecting allocation of static entry %d\n", item);
> 521 return -EINVAL;
> 522 }
>
Hi,
I remember editing qcom_smem_is_available but probably it got lost when
amending the changes.
Creating a fix patch just now. Can you help me with what link I should
put in the Closes tag?
--
Ansuel
next prev parent reply other threads:[~2025-11-21 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 8:48 [bug report] soc: qcom: smem: better track SMEM uninitialized state Dan Carpenter
2025-11-21 8:55 ` Christian Marangi [this message]
2025-11-21 9:25 ` Konrad Dybcio
2025-11-21 10:37 ` Dan Carpenter
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=69202917.7b0a0220.234ce9.9e36@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=linux-arm-msm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox