Messages in this thread |  | | Date | Sat, 31 Dec 2022 11:21:43 -0600 | From | Samuel Holland <> | 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
|  |