lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] staging: fieldbus: arcx-anybus: constify static structs
Hi Rikard, thank you for the contribution.

On Sun, Feb 7, 2021 at 3:25 PM Rikard Falkeborn
<rikard.falkeborn@gmail.com> 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@gmail.com>

Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>

\
 
 \ /
  Last update: 2021-02-08 14:26    [W:0.090 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site