]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc: qcom: smem: drop the WARN_ON() on SMEM item validation
authorKathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
Fri, 31 Oct 2025 05:51:01 +0000 (11:21 +0530)
committerBjorn Andersson <andersson@kernel.org>
Tue, 4 Nov 2025 03:14:16 +0000 (21:14 -0600)
When a SMEM item is allocated or retrieved, sanity check on the SMEM item
is performed and backtrace is printed if it is invalid. But there is no
benefit in dumping that information in the logs. Lets drop it.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251031-image-crm-part2-v2-1-c224c45c381a@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/smem.c

index f4a4acfefba9a5aa7c49303c5ced5b5dfb467177..fef840b5457407a85051ded0e835430dbebfe8bb 100644 (file)
@@ -521,7 +521,7 @@ int qcom_smem_alloc(unsigned host, unsigned item, size_t size)
                return -EINVAL;
        }
 
-       if (WARN_ON(item >= __smem->item_count))
+       if (item >= __smem->item_count)
                return -EINVAL;
 
        ret = hwspin_lock_timeout_irqsave(__smem->hwlock,
@@ -694,7 +694,7 @@ void *qcom_smem_get(unsigned host, unsigned item, size_t *size)
        if (IS_ERR(__smem))
                return __smem;
 
-       if (WARN_ON(item >= __smem->item_count))
+       if (item >= __smem->item_count)
                return ERR_PTR(-EINVAL);
 
        if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) {