rk27xx: fix a -Wundef warning in simulator builds

config.h defines HAVE_STORAGE_FLUSH for the rk27xx Scheme A FTL when
CONFIG_STORAGE has STORAGE_NAND and CONFIG_NAND is NAND_RK27XX. sim.h
undefines CONFIG_NAND but keeps CONFIG_STORAGE, so a simulator for a
NAND target - the iPod nano 2G - evaluated the undefined macro:

  "CONFIG_NAND" is not defined, evaluates to 0 [-Wundef]

Test that it is defined first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Id1e328f08c14d7c5528d29f110fdbb8be68ab2f5
This commit is contained in:
Marcin Bukat 2026-10-01 16:40:13 +02:00
parent 01d18e42a9
commit 3b142f45ce

View file

@ -902,7 +902,8 @@ Lyre prototype 1 */
* pages in RAM (ftl-scheme-a.c) until a later write completes them;
* storage_flush() commits them at shutdown, ROLO and wherever else it is
* called. */
#if (CONFIG_STORAGE & STORAGE_NAND) && (CONFIG_NAND == NAND_RK27XX) \
#if (CONFIG_STORAGE & STORAGE_NAND) && defined(CONFIG_NAND) \
&& (CONFIG_NAND == NAND_RK27XX) \
&& (CONFIG_RK27XX_FTL == RK27XX_FTL_SCHEME_A) \
&& !defined(HAVE_STORAGE_FLUSH)
#define HAVE_STORAGE_FLUSH