[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230818155815.GY986605@google.com>
Date: Fri, 18 Aug 2023 16:58:15 +0100
From: Lee Jones <lee@...nel.org>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: core: Un-constify mfd_cell.of_reg
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;
[...]
};
> accidental and prevents dynamically filling in mfd_cells that use of_reg.
> Remove the `const`.
Dynamically filling mfd_cells is generally frowned upon.
Please submit this with the code that will be using it.
> Fixes: 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes")
> Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
> ---
> include/linux/mfd/core.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
> index 47e7a3a61ce6..e8bcad641d8c 100644
> --- a/include/linux/mfd/core.h
> +++ b/include/linux/mfd/core.h
> @@ -92,7 +92,7 @@ struct mfd_cell {
> * (above) when matching OF nodes with devices that have identical
> * compatible strings
> */
> - const u64 of_reg;
> + u64 of_reg;
>
> /* Set to 'true' to use 'of_reg' (above) - allows for of_reg=0 */
> bool use_of_reg;
> --
> 2.39.2
>
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists