From: sashiko-bot@kernel.org
To: "Vishnu Reddy" <busanna.reddy@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH v5 01/14] media: iris: Add iris vpu bus support
Date: Fri, 08 May 2026 23:20:18 +0000 [thread overview]
Message-ID: <20260508232019.B18B1C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260509-glymur-v5-1-7fbb340c5dbd@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Missing explicit inclusion of `<linux/slab.h>`.
- [Low] Unchecked return value of `dev_set_name()` obscures memory allocation failures.
--
commit 98f1237fb4e4382526cb267a03ee922744bc30d4
Author: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
media: iris: Add iris vpu bus support
This commit introduces the iris-vpu-bus to create a dynamic child device
for firmware loading, setting up a dedicated IOMMU context with a separate
stream ID.
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_bus.c b/drivers/media/platform/qcom/iris/iris_vpu_bus.c
> new file mode 100644
> index 0000000000000..15ba4d9c563e9
> --- /dev/null
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_bus.c
> @@ -0,0 +1,69 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#include <linux/device.h>
> +#include <linux/iris_vpu_bus.h>
> +#include <linux/of_device.h>
This isn't a bug, but should linux/slab.h be explicitly included here?
The implementation uses slab allocator functions like kzalloc_obj() and
kfree(), and relying on implicit inclusion could lead to build breakages on
different architectures or in future kernel versions.
[ ... ]
> +struct device *create_iris_vpu_bus_device(struct device *parent_device, const char *name,
> + u64 dma_mask, const u32 *iommu_fid)
> +{
> + struct device *dev;
> + int ret;
> +
> + dev = kzalloc_obj(*dev);
> + if (!dev)
> + return ERR_PTR(-ENOMEM);
> +
> + dev->release = release_iris_vpu_bus_device;
> + dev->bus = &iris_vpu_bus_type;
> + dev->parent = parent_device;
> + dev->coherent_dma_mask = dma_mask;
> + dev->dma_mask = &dev->coherent_dma_mask;
> +
> + dev_set_name(dev, "%s", name);
Is it safe to ignore the return value of dev_set_name() here?
If memory allocation fails, dev_set_name() returns -ENOMEM and leaves the
device name as NULL. The subsequent call to device_register() handles this
gracefully by returning -EINVAL rather than propagating the original -ENOMEM.
While this does not cause a crash, could dropping the accurate error code
obscure the root out-of-memory cause during debugging?
> + dev_set_drvdata(dev, (void *)iommu_fid);
> +
> + ret = device_register(dev);
> + if (ret) {
> + put_device(dev);
> + return ERR_PTR(ret);
> + }
> +
> + return dev;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-05-08 23:20 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 18:59 [PATCH v5 00/14] media: iris: Add support for glymur platform Vishnu Reddy
2026-05-08 18:59 ` [PATCH v5 01/14] media: iris: Add iris vpu bus support Vishnu Reddy
2026-05-08 19:16 ` Dmitry Baryshkov
2026-05-09 17:05 ` Vishnu Reddy
2026-05-08 23:20 ` sashiko-bot [this message]
2026-05-08 18:59 ` [PATCH v5 02/14] iommu: Add iris-vpu-bus to iommu_buses Vishnu Reddy
2026-05-08 19:16 ` Dmitry Baryshkov
2026-05-08 23:42 ` sashiko-bot
2026-05-08 18:59 ` [PATCH v5 03/14] media: iris: Fix VM count passed to firmware Vishnu Reddy
2026-05-08 19:20 ` Dmitry Baryshkov
2026-05-08 18:59 ` [PATCH v5 04/14] dt-bindings: media: qcom,venus: Remove clock, power-domain, and iommus from common schema Vishnu Reddy
2026-05-08 19:22 ` Dmitry Baryshkov
2026-05-09 17:04 ` Vishnu Reddy
2026-05-08 18:59 ` [PATCH v5 05/14] dt-bindings: media: qcom,glymur-iris: Add glymur video codec Vishnu Reddy
2026-05-08 18:59 ` [PATCH v5 06/14] media: iris: Add context bank hooks for platform specific initialization Vishnu Reddy
2026-05-09 0:41 ` sashiko-bot
2026-05-08 18:59 ` [PATCH v5 07/14] media: iris: Enable Secure PAS support with IOMMU managed by Linux Vishnu Reddy
2026-05-08 19:05 ` Trilok Soni
2026-05-08 20:20 ` Dmitry Baryshkov
2026-05-09 2:05 ` sashiko-bot
2026-05-08 18:59 ` [PATCH v5 08/14] media: iris: Rename clock and power domain macros to use vcodec prefix Vishnu Reddy
2026-05-08 20:22 ` Dmitry Baryshkov
2026-05-09 17:07 ` Vishnu Reddy
2026-05-09 2:18 ` sashiko-bot
2026-05-08 18:59 ` [PATCH v5 09/14] media: iris: Use power domain type to look up pd_devs index Vishnu Reddy
2026-05-08 20:44 ` Dmitry Baryshkov
2026-05-09 17:02 ` Vishnu Reddy
2026-05-08 18:59 ` [PATCH v5 10/14] media: iris: Add power sequence for Glymur Vishnu Reddy
2026-05-08 20:54 ` Dmitry Baryshkov
2026-05-09 2:56 ` sashiko-bot
2026-05-08 19:00 ` [PATCH v5 11/14] media: iris: Add support to select core for dual core platforms Vishnu Reddy
2026-05-08 21:00 ` Dmitry Baryshkov
2026-05-09 3:55 ` sashiko-bot
2026-05-08 19:00 ` [PATCH v5 12/14] media: iris: Add platform data for glymur Vishnu Reddy
2026-05-08 21:05 ` Dmitry Baryshkov
2026-05-09 4:23 ` sashiko-bot
2026-05-08 19:00 ` [PATCH v5 13/14] arm64: dts: qcom: glymur: Add iris video node Vishnu Reddy
2026-05-08 19:27 ` Dmitry Baryshkov
2026-05-09 16:56 ` Vishnu Reddy
2026-05-08 19:00 ` [PATCH v5 14/14] arm64: dts: qcom: glymur-crd: Enable iris video codec node Vishnu Reddy
2026-05-08 23:54 ` Dmitry Baryshkov
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=20260508232019.B18B1C2BCB0@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=busanna.reddy@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko@lists.linux.dev \
/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