Hi Casey,

On Tue, 12 May 2026 at 14:13, Casey Connolly <[email protected]> wrote:
>
> This loop is duplicated 3 times, put it into its own function and call
> it instead. This simplifies the logic in a few functions.
>
> Signed-off-by: Casey Connolly <[email protected]>
> ---
>  arch/arm/cpu/armv8/cache_v8.c | 95 
> +++++++++++++------------------------------
>  1 file changed, 29 insertions(+), 66 deletions(-)
>
> diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
> index 36d337378fcd..e9ce6335ee9e 100644
> --- a/arch/arm/cpu/armv8/cache_v8.c
> +++ b/arch/arm/cpu/armv8/cache_v8.c
> @@ -1022,8 +1022,31 @@ static u64 set_one_region(u64 start, u64 size, u64 
> attrs, bool flag, int level)
>         /* Roll on to the next page table level */
>         return 0;
>  }
>
> +static void set_regions(u64 start, u64 size, u64 attrs, bool flag)
> +{
> +       int level;
> +       u64 r, va_bits;
> +       get_tcr(NULL, &va_bits);

va_bits isn't used anywhere

[...]


With the above fixed,
Reviewed-by: Ilias Apalodimas <[email protected]>

Reply via email to