[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f62aql76feibrznlau4xfppxci3atmxhfl5tyrattogt5ly23p@7f2gm6wykogx>
Date: Tue, 19 Aug 2025 16:00:30 +0200
From: Maxime Ripard <mripard@...nel.org>
To: Brian Masney <bmasney@...hat.com>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/9] clk: test: introduce clk_dummy_rate_mhz()
On Tue, Aug 12, 2025 at 10:40:32AM -0400, Brian Masney wrote:
> Some of the mock tests care about the relationship between two
> different rates to ensure that functionality in the clk core is
> exercised when the parent rate is negotiated by using specific
> rates. Introduce clk_dummy_rate_mhz() to improve readability.
> Change the DUMMY_CLOCK_* rate constants over to use this.
>
> Signed-off-by: Brian Masney <bmasney@...hat.com>
> ---
> drivers/clk/clk_test.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/clk_test.c b/drivers/clk/clk_test.c
> index a268d7b5d4cb28ec1f029f828c31107f8e130556..fafa736ca32144a2feae75a8d641abca3162d42d 100644
> --- a/drivers/clk/clk_test.c
> +++ b/drivers/clk/clk_test.c
> @@ -21,9 +21,10 @@
>
> static const struct clk_ops empty_clk_ops = { };
>
> -#define DUMMY_CLOCK_INIT_RATE (42 * 1000 * 1000)
> -#define DUMMY_CLOCK_RATE_1 (142 * 1000 * 1000)
> -#define DUMMY_CLOCK_RATE_2 (242 * 1000 * 1000)
> +#define clk_dummy_rate_mhz(rate) ((rate) * 1000 * 1000)
Macros are typically defined with uppercase names. Also, you can use
HZ_PER_MHZ.
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)
Powered by blists - more mailing lists