All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] soc: qcom: smem: better track SMEM uninitialized state
@ 2025-11-21  8:48 Dan Carpenter
  2025-11-21  8:55 ` Christian Marangi
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2025-11-21  8:48 UTC (permalink / raw)
  To: Christian Marangi; +Cc: linux-arm-msm

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         }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-21 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21  8:48 [bug report] soc: qcom: smem: better track SMEM uninitialized state Dan Carpenter
2025-11-21  8:55 ` Christian Marangi
2025-11-21  9:25   ` Konrad Dybcio
2025-11-21 10:37   ` Dan Carpenter

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.