[PATCH 00/12] mtd: Remove #ifdef guards for PM related
From: Paul Cercueil
Date: Thu Nov 05 2026 - 12:19:56 EST
Hi,
This patchset updates the MTD core / NAND core as well as several driver
to get rid of the #ifdef CONFIG_PM guards.
Instead, the code that depends on PM or runtime PM will be
garbage-collected by the compiler automatically if this config option is
not set.
The rationale behind this change is that in general conditionally
compiled code is a bad choice, as code behind a rarely-used config can
get broken without anybody noticing.
Cheers,
-Paul
Paul Cercueil (12):
mtd: Remove #ifdef guards for PM related functions
mtd: rawnand: vf610: Remove #ifdef guards for PM related functions
mtd: spear_smi: Remove #ifdef guards for PM related functions
mtd: physmap: Remove #ifdef guards for PM related functions
mtd: maps: pxa2xx: Remove #ifdef guards for PM related functions
mtd: nand: mtk: Remove #ifdef guards for PM related functions
mtd: rawnand: fsmc: Remove #ifdef guards for PM related functions
mtd: rawnand: hisi504: Remove #ifdef guards for PM related functions
mtd: rawnand: mtk: Remove #ifdef guards for PM related functions
mtd: rawnand: omap_elm: Remove #ifdef guards for PM related functions
mtd: rawnand: r852: Remove #ifdef guards for PM related functions
mtd: rawnand: txx9ndfmc: Remove #ifdef guards for PM related functions
drivers/mtd/devices/spear_smi.c | 6 ++----
drivers/mtd/maps/physmap-core.c | 6 +-----
drivers/mtd/maps/pxa2xx-flash.c | 6 +-----
drivers/mtd/mtdcore.c | 10 ++--------
drivers/mtd/nand/ecc-mtk.c | 8 ++------
drivers/mtd/nand/raw/fsmc_nand.c | 6 ++----
drivers/mtd/nand/raw/hisi504_nand.c | 7 +++----
drivers/mtd/nand/raw/mtk_nand.c | 8 ++------
drivers/mtd/nand/raw/omap_elm.c | 6 ++----
drivers/mtd/nand/raw/r852.c | 6 ++----
drivers/mtd/nand/raw/txx9ndfmc.c | 6 +-----
drivers/mtd/nand/raw/vf610_nfc.c | 6 ++----
12 files changed, 22 insertions(+), 59 deletions(-)
Cc: Stefan Agner <stefan@xxxxxxxx>
Cc: Matthias Brugger <matthias.bgg@xxxxxxxxx>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-mediatek@xxxxxxxxxxxxxxxxxxx
Cc: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
--
2.47.3