Re: [PATCH] staging: fieldbus: arcx-anybus: constify static structs

From: Sven Van Asbroeck
Date: Mon Feb 08 2021 - 08:24:59 EST


Hi Rikard, thank you for the contribution.

On Sun, Feb 7, 2021 at 3:25 PM Rikard Falkeborn
<rikard.falkeborn@xxxxxxxxx> wrote:
>
> Constify two static structs which are never modified, to allow the
> compiler to put them in read-only memory.
>
> The only usage of controller_attribute_group is to put its address in an
> array of pointers to const struct attribute_group, and the only usage of
> can_power_ops is to assign its address to the 'ops' field in the
> regulator_desc struct, which is a pointer to const struct regulator_ops.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@xxxxxxxxx>

Reviewed-by: Sven Van Asbroeck <TheSven73@xxxxxxxxx>