From: Krzysztof Kozlowski <krzk@kernel.org>
To: luyulin <luyulin@eswincomputing.com>,
linus.walleij@linaro.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
kees@kernel.org, gustavoars@kernel.org, brgl@bgdev.pl,
linux-hardening@vger.kernel.org
Cc: zhengyu@eswincomputing.com, ningyu@eswincomputing.com,
huangyifeng@eswincomputing.com, linmin@eswincomputing.com,
fenglin@eswincomputing.com, lianghujun@eswincomputing.com,
Samuel Holland <samuel.holland@sifive.com>
Subject: Re: [PATCH 2/2] pinctrl: eswin: Add eic7700 pinctrl driver
Date: Tue, 6 May 2025 13:08:32 +0200 [thread overview]
Message-ID: <1f7a47f6-33d0-4e35-bd4f-9d130e37c931@kernel.org> (raw)
In-Reply-To: <20250506091241.941-1-luyulin@eswincomputing.com>
On 06/05/2025 11:12, luyulin wrote:
> +static int eic7700_pinctrl_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct pinctrl_dev *pctldev;
> + struct eic7700_pinctrl *pc;
> + struct regulator *regulator;
> + u32 voltage, rgmii0_mode, rgmii1_mode;
> + int ret;
> +
> + pc = devm_kzalloc(dev, struct_size(pc, functions, EIC7700_FUNCTIONS_COUNT), GFP_KERNEL);
> + if (!pc)
> + return -ENOMEM;
> +
> + pc->base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(pc->base))
> + return PTR_ERR(pc->base);
> +
> + regulator = devm_regulator_get(dev, "vrgmii");
> + if (IS_ERR_OR_NULL(regulator)) {
> + dev_err(dev, "failed to get vrgmii regulator!\n");
Hm? So here you do not use dev_err_probe, even though it is actually
important, but...
...
> +
> + ret = devm_pinctrl_register_and_init(dev, &pc->desc, pc, &pctldev);
> + if (ret)
> + return dev_err_probe(dev, ret, "could not register pinctrl driver\n");
Here you use, even though here it actually does not matter? It makes no
sense, it is not logical. If using dev_err_probe selectively, then use
it when it matters - so for probe deferal. Or preferred is to use it always.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-05-06 11:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 9:08 [PATCH 0/2] luyulin
2025-05-06 9:11 ` [PATCH 1/2] dt-bindings: pinctrl: eswin: Document for eic7700 SoC luyulin
2025-05-06 11:06 ` Krzysztof Kozlowski
2025-05-06 9:12 ` [PATCH 2/2] pinctrl: eswin: Add eic7700 pinctrl driver luyulin
2025-05-06 11:08 ` Krzysztof Kozlowski [this message]
2025-05-08 5:42 ` kernel test robot
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=1f7a47f6-33d0-4e35-bd4f-9d130e37c931@kernel.org \
--to=krzk@kernel.org \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fenglin@eswincomputing.com \
--cc=gustavoars@kernel.org \
--cc=huangyifeng@eswincomputing.com \
--cc=kees@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lianghujun@eswincomputing.com \
--cc=linmin@eswincomputing.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luyulin@eswincomputing.com \
--cc=ningyu@eswincomputing.com \
--cc=robh@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=zhengyu@eswincomputing.com \
/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