From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ciprian Costea <dan.carpenter@linaro.org>,
Srinivas Kandagatla <srini@kernel.org>
Cc: linaro-s32@linaro.org, NXP S32 Linux Team <s32@nxp.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP
Date: Sun, 17 Aug 2025 07:52:12 +0200 [thread overview]
Message-ID: <a5cbd3d4-b8ba-4e1f-8ae1-b0e79fedfd47@kernel.org> (raw)
In-Reply-To: <7e1f16bf09e77afef4cc5fa609a6c3ad820bb14c.1755341000.git.dan.carpenter@linaro.org>
On 16/08/2025 12:47, Ciprian Costea wrote:
> Provide access to the On Chip One-Time Programmable Controller (OCOTP)
> pages on the NXP S32G platform.
>
> Signed-off-by: Ciprian Costea <ciprianmarian.costea@nxp.com>
> Co-developed-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
> Co-developed-by: Larisa Grigore <larisa.grigore@nxp.com>
Incomplete chain, missing SoBs. You cannot add someone's Co-developed-by
if they do not sign the patch.
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/nvmem/Kconfig | 10 ++
> drivers/nvmem/Makefile | 2 +
> drivers/nvmem/s32g-ocotp-nvmem.c | 171 +++++++++++++++++++++++++++++++
> 3 files changed, 183 insertions(+)
> create mode 100644 drivers/nvmem/s32g-ocotp-nvmem.c
>
> diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
> +
> +static int s32g_ocotp_probe(struct platform_device *pdev)
> +{
> + const struct of_device_id *of_matched_dt_id;
> + struct s32g_ocotp_priv *s32g_data;
> + struct device *dev = &pdev->dev;
> + struct nvmem_device *nvmem;
> + struct resource *res;
> +
> + of_matched_dt_id = of_match_device(ocotp_of_match, dev);
> + if (!of_matched_dt_id) {
This is useless check, drop everything around of_matched_dt_id.
> + dev_err(dev, "Unable to find driver data.\n");
> + return -ENODEV;
> + }
> +
> + s32g_data = devm_kzalloc(dev, sizeof(*s32g_data), GFP_KERNEL);
> + if (!s32g_data)
> + return -ENOMEM;
> +
> + s32g_data->fuse = of_device_get_match_data(dev);
> + if (!s32g_data->fuse) {
> + dev_err(dev, "Cannot find platform device data.\n");
This is impossible condition, so no need for error message.
> + return -ENODEV;
And here probably -EINVAL, because if it was probed, the device is there.
> + }
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-08-17 5:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 10:46 [PATCH 0/3] " Dan Carpenter
2025-08-16 10:47 ` [PATCH 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file Ciprian Costea
2025-08-16 12:29 ` Rob Herring (Arm)
2025-08-17 5:48 ` Krzysztof Kozlowski
2025-08-18 8:03 ` Krzysztof Kozlowski
2025-08-16 10:47 ` [PATCH 2/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Ciprian Costea
2025-08-17 5:52 ` Krzysztof Kozlowski [this message]
2025-08-19 11:47 ` Srinivas Kandagatla
2025-08-16 10:47 ` [PATCH 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
2025-08-17 5:53 ` Krzysztof Kozlowski
2025-08-18 18:24 ` [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Rob Herring (Arm)
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=a5cbd3d4-b8ba-4e1f-8ae1-b0e79fedfd47@kernel.org \
--to=krzk@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=linaro-s32@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s32@nxp.com \
--cc=srini@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
all inboxes | Powered by JetHome®