[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ed4a1b6d-3979-652e-0181-c34bb5a40d5d@sholland.org>
Date: Sat, 31 Dec 2022 11:21:43 -0600
From: Samuel Holland <samuel@...lland.org>
To: Stephen Boyd <sboyd@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>
Cc: Michael Turquette <mturquette@...libre.com>,
linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH] clk: sunxi-ng: mp: Avoid computing the rate twice
Hi Stephen,
On 8/15/22 12:26, Stephen Boyd wrote:
> Quoting Samuel Holland (2022-08-09 18:40:24)
>> ccu_mp_find_best() already computes a best_rate at the same time as the
>> best m and p factors. Return it so the caller does not need to duplicate
>> the division.
>
> Did the compiler figure this out and thus this patch makes no difference
> to the final object code?
It makes a difference at least on my gcc version 11.1.0.
Before:
text data bss dec hex filename
18257 12 0 18269 475d drivers/clk/sunxi-ng/sunxi-ccu.o
After:
text data bss dec hex filename
18083 12 0 18095 46af drivers/clk/sunxi-ng/sunxi-ccu.o
I will send a v2 covering all of the CCU clock types.
Regards,
Samuel
Powered by blists - more mailing lists