From: Brian Masney <bmasney@redhat.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] clk: tests: add clk_hw_get_dev() and clk_hw_get_of_node() tests
Date: Mon, 2 Jun 2025 13:06:30 -0400 [thread overview]
Message-ID: <aD3aFs-hbtYw0PVO@x1> (raw)
In-Reply-To: <20250417-clk-hw-get-helpers-v1-2-7743e509612a@baylibre.com>
On Thu, Apr 17, 2025 at 03:44:23PM +0200, Jerome Brunet wrote:
> Add kunit test suites clk_hw_get_dev() and clk_hw_get_of_node()
> for clocks registered with clk_hw_register() and of_clk_hw_register()
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
I also ran the tests with no issues.
Just a few minor nits below if you happen to spin a v2.
> @@ -3016,7 +3023,7 @@ KUNIT_ARRAY_PARAM(clk_register_clk_parent_data_device_hw_test,
> */
> static void clk_register_clk_parent_data_device_hw_test(struct kunit *test)
> {
> - struct clk_register_clk_parent_data_device_ctx *ctx;
> + struct clk_register_device_ctx *ctx;
> const struct clk_register_clk_parent_data_test_case *test_param;
> struct clk_dummy_context *parent;
> struct clk_hw *parent_hw;
Put in reverse Christmas tree where possible.
> +static void clk_hw_register_get_of_node_test(struct kunit *test)
> +{
> + const struct clk_hw_get_dev_of_node_test_param *test_param = test->param_value;
> + struct clk_register_device_ctx *ctx = test->priv;
> + struct device *dev = test_param->has_ref ? ctx->dev : NULL;
> + struct device_node *np = NULL;
> +
> + if (dev) {
> + np = dev_of_node(dev);
> +
> + if (!np)
> + np = dev_of_node(dev->parent);
Remove newline before the if().
Brian
next prev parent reply other threads:[~2025-06-02 17:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 13:44 [PATCH 0/2] clk: add a clk_hw helpers to get the clock device or device_node Jerome Brunet
2025-04-17 13:44 ` [PATCH 1/2] " Jerome Brunet
2025-05-05 9:33 ` Jerome Brunet
2025-06-02 16:42 ` Brian Masney
2025-06-20 7:18 ` Stephen Boyd
2025-04-17 13:44 ` [PATCH 2/2] clk: tests: add clk_hw_get_dev() and clk_hw_get_of_node() tests Jerome Brunet
2025-06-02 17:06 ` Brian Masney [this message]
2025-06-20 7:18 ` Stephen Boyd
2025-06-02 11:59 ` [PATCH 0/2] clk: add a clk_hw helpers to get the clock device or device_node Jerome Brunet
2025-06-20 7:20 ` Stephen Boyd
2025-06-23 8:34 ` Jerome Brunet
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=aD3aFs-hbtYw0PVO@x1 \
--to=bmasney@redhat.com \
--cc=jbrunet@baylibre.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.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