[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fbf1e3aa-cab3-44b5-b873-b4061eb169b2@kernel.org>
Date: Wed, 29 Jan 2025 11:28:46 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>, Dinh Nguyen
<dinguyen@...nel.org>, Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: socfpga: stratix10: Optimize local variables
On 14/01/2025 12:29, Thorsten Blum wrote:
> Since readl() returns a u32, the local variable reg can also have the
> data type u32. Furthermore, mdiv and refdiv are derived from reg and can
> also be a u32.
>
> Since do_div() casts the divisor to u32 anyway, changing the data type
> of refdiv to u32 removes the following Coccinelle/coccicheck warning
> reported by do_div.cocci:
>
> WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead
>
> Compile-tested only.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Best regards,
Krzysztof
Powered by blists - more mailing lists