Re: [PATCH] mfd: core: Un-constify mfd_cell.of_reg

From: Michał Mirosław
Date: Fri Aug 18 2023 - 20:12:02 EST


On Fri, Aug 18, 2023 at 04:58:15PM +0100, Lee Jones wrote:
> On Wed, 16 Aug 2023, Michał Mirosław wrote:
>
> > of_reg is the only constant member of struct mfd_cell. It seems to be
>
> Sorry, what?
>
> struct mfd_cell {
> const char *name;
> [...]
> const struct mfd_cell_acpi_match *acpi_match;
> [...]
> const struct software_node *swnode;
> [...]
> const char *of_compatible;
> [...]
> const u64 of_reg;
> [...]
> const struct resource *resources;
> [...]
> const char * const *parent_supplies;
> [...]
> };
[...]

All those are pointers to const, not const fields themselves. Only
`of_reg` is const regardless of the whole structure.

--
Michał Mirosław