From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ryan Chen <ryan_chen@aspeedtech.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 2/3] reset: aspeed: register AST2700 reset auxiliary bus device
Date: Mon, 24 Feb 2025 11:12:13 +0100 [thread overview]
Message-ID: <71cf8012-3b77-43de-b8ac-54c84a97f9d3@kernel.org> (raw)
In-Reply-To: <20250224095506.2047064-3-ryan_chen@aspeedtech.com>
On 24/02/2025 10:55, Ryan Chen wrote:
> +
> +static void aspeed_reset_unregister_adev(void *_adev)
> +{
> + struct auxiliary_device *adev = _adev;
> +
> + auxiliary_device_delete(adev);
> + auxiliary_device_uninit(adev);
> +}
> +
> +static void aspeed_reset_adev_release(struct device *dev)
> +{
> + struct auxiliary_device *adev = to_auxiliary_dev(dev);
> +
> + kfree(adev);
> +}
> +
Every exported function *must* have kerneldoc.
> +int aspeed_reset_controller_register(struct device *clk_dev, void __iomem *base,
> + const char *adev_name)
> +{
> + struct auxiliary_device *adev;
> + int ret;
> +
> + adev = kzalloc(sizeof(*adev), GFP_KERNEL);
> + if (!adev)
> + return -ENOMEM;
> +
> + adev->name = adev_name;
> + adev->dev.parent = clk_dev;
> + adev->dev.release = aspeed_reset_adev_release;
> + adev->id = 666u;
> +
> + ret = auxiliary_device_init(adev);
> + if (ret) {
> + kfree(adev);
> + return ret;
> + }
> +
> + ret = auxiliary_device_add(adev);
> + if (ret) {
> + auxiliary_device_uninit(adev);
> + return ret;
> + }
> +
> + adev->dev.platform_data = (__force void *)base;
> +
> + return devm_add_action_or_reset(clk_dev, aspeed_reset_unregister_adev, adev);
> +}
> +EXPORT_SYMBOL_GPL(aspeed_reset_controller_register);
No, you cannot export functions without users. There is no single user
of this, so this is not justified at all.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-02-24 10:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 9:55 [PATCH v9 0/3] Add support for AST2700 clk driver Ryan Chen
2025-02-24 9:55 ` [PATCH v9 1/3] dt-binding: clock: ast2700: modify soc0/1 clock define Ryan Chen
2025-02-24 10:10 ` Krzysztof Kozlowski
2025-02-25 0:41 ` Ryan Chen
2025-02-25 7:54 ` Krzysztof Kozlowski
2025-02-25 9:49 ` Ryan Chen
2025-02-25 13:13 ` Krzysztof Kozlowski
2025-02-26 5:10 ` Ryan Chen
2025-02-26 9:52 ` Krzysztof Kozlowski
2025-02-27 8:04 ` Ryan Chen
2025-02-24 9:55 ` [PATCH v9 2/3] reset: aspeed: register AST2700 reset auxiliary bus device Ryan Chen
2025-02-24 10:12 ` Krzysztof Kozlowski [this message]
2025-02-24 10:15 ` Krzysztof Kozlowski
2025-02-24 16:27 ` Philipp Zabel
2025-02-25 2:20 ` Ryan Chen
2025-02-25 7:51 ` Krzysztof Kozlowski
2025-02-24 9:55 ` [PATCH v9 3/3] clk: aspeed: add AST2700 clock driver Ryan Chen
2025-03-06 18:01 ` 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=71cf8012-3b77-43de-b8ac-54c84a97f9d3@kernel.org \
--to=krzk@kernel.org \
--cc=andrew@aj.id.au \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=ryan_chen@aspeedtech.com \
--cc=sboyd@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