[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGngYiWV43EGDDPU7K6qjFTMmniVY0eOY_BmVP5iJRdtm=-H0g@mail.gmail.com>
Date: Mon, 8 Feb 2021 08:21:05 -0500
From: Sven Van Asbroeck <thesven73@...il.com>
To: Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [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@...il.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@...il.com>
Reviewed-by: Sven Van Asbroeck <TheSven73@...il.com>
Powered by blists - more mailing lists