Re: [RFC PATCH v2 02/13] mtd: mtdswap: Initialise mtdswap_ops with a page size variable
From: Miquel Raynal
Date: Wed Dec 02 2026 - 06:25:53 EST
On 02/12/2026 at 03:16:23 GMT, Eric Curtin <ericcurtin17@xxxxxxxxx> wrote:
> From: Eric Curtin <eric.curtin@xxxxxxxxxx>
>
> With arm64 boot-time page size selection PAGE_SIZE is not a
> compile-time constant, so it cannot be used in the static initialiser
> of mtdswap_ops, whose .blksize is PAGE_SIZE.
>
> Define the structure with DEFINE_GLOBAL_PAGE_SIZE_VAR(), which
> initialises it at boot when the page size is not fixed and is an
> ordinary static initialiser otherwise.
>
> No functional change for compile-time page sizes.
>
> Signed-off-by: Eric Curtin <eric.curtin@xxxxxxxxxx>
Acked-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
I believe this patch has very little chance to conflict with the MTD
tree, so it can be carried through the mm tree once the series will be
applied.
Thanks,
Miquèl