Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Suraj Gupta" <suraj.gupta2@amd.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next 1/7] clk: Add devm_clk_bulk_get_enable()
Date: Fri, 24 Jul 2026 14:17:25 +0000	[thread overview]
Message-ID: <20260724141726.54B761F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723123838.125145-2-suraj.gupta2@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The docstring for devm_clk_bulk_get_enable() incorrectly claims it returns an IS_ERR() condition.
--

--- Patch [1]: [PATCH net-next 1/7] clk: Add devm_clk_bulk_get_enable() ---
commit 0e92e9409720067c1f28a37f1eb2bb60ddaa0d56
Author: Suraj Gupta <suraj.gupta2@amd.com>

clk: Add devm_clk_bulk_get_enable()

This commit adds devm_clk_bulk_get_enable() to get, prepare, and enable a
mandatory set of clocks with device-managed cleanup. It introduces a
wrapper around the existing __devm_clk_bulk_get_enable() helper.

> diff --git a/include/linux/clk.h b/include/linux/clk.h
> index 998ba3f261dac..0289ac4c6e48e 100644
> --- a/include/linux/clk.h
> +++ b/include/linux/clk.h
> @@ -502,6 +502,22 @@ int __must_check devm_clk_bulk_get(struct device *dev, int num_clks,
>   */
>  int __must_check devm_clk_bulk_get_optional(struct device *dev, int num_clks,
>  					    struct clk_bulk_data *clks);
> +/**
> + * devm_clk_bulk_get_enable - Get and enable bulk clocks (managed)
> + * @dev: device for clock "consumer"
> + * @num_clks: the number of clk_bulk_data
> + * @clks: pointer to the clk_bulk_data table of consumer
> + *
> + * Behaves the same as devm_clk_bulk_get() but also prepares and enables the
> + * clocks in one operation with management. The clks will automatically be
> + * disabled, unprepared and freed when the device is unbound.
> + *
> + * Return: 0 if all clocks specified in clk_bulk_data table are obtained and
> + * enabled successfully. Otherwise returns valid IS_ERR() condition containing
> + * errno.
> + */

[Severity: Low]
Does this documentation incorrectly suggest using IS_ERR() on the return
value?

Since devm_clk_bulk_get_enable() returns a standard integer error code
rather than a pointer, consumers following this docstring and attempting
to use IS_ERR() on the result would encounter compiler warnings. Should
this instead state that it returns a negative error code on failure?

> +int __must_check devm_clk_bulk_get_enable(struct device *dev, int num_clks,
> +					  struct clk_bulk_data *clks);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260723123838.125145-1-suraj.gupta2@amd.com?part=1

  parent reply	other threads:[~2026-07-24 14:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 12:38 [PATCH net-next 0/7] net: xilinx: axienet: Add 10G/25G (XXV) ethernet support Suraj Gupta
2026-07-23 12:38 ` [PATCH net-next 1/7] clk: Add devm_clk_bulk_get_enable() Suraj Gupta
2026-07-23 15:04   ` Brian Masney
2026-07-24 14:17   ` sashiko-bot [this message]
2026-07-23 12:38 ` [PATCH net-next 2/7] net: xilinx: axienet: Introduce axienet_config for MAC-specific ops Suraj Gupta
2026-07-24 14:17   ` sashiko-bot
2026-07-23 12:38 ` [PATCH net-next 3/7] dt-bindings: net: xlnx,axi-ethernet: Add 10G/25G (XXV) ethernet Suraj Gupta
2026-07-24 13:16   ` Rob Herring (Arm)
2026-07-23 12:38 ` [PATCH net-next 4/7] net: xilinx: axienet: Add 10G/25G (XXV) ethernet support Suraj Gupta
2026-07-24 14:17   ` sashiko-bot
2026-07-23 12:38 ` [PATCH net-next 5/7] net: xilinx: axienet: Make axienet_rmon_ranges non-static for reuse Suraj Gupta
2026-07-23 12:38 ` [PATCH net-next 6/7] net: xilinx: axienet: Dispatch statistics through axienet_config ops Suraj Gupta
2026-07-24 14:17   ` sashiko-bot
2026-07-23 12:38 ` [PATCH net-next 7/7] net: xilinx: axienet: Add statistics support for XXV ethernet Suraj Gupta

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=20260724141726.54B761F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=suraj.gupta2@amd.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