Skip to content

zms: unable to compile with CONFIG_ZMS_LOOKUP_CACHE=n #95614

@JordanYates

Description

@JordanYates

Describe the bug

The ZMS subsystem no longer compiles on Zephyr v4.2 with CONFIG_ZMS_NO_DOUBLE_WRITE=y and CONFIG_ZMS_LOOKUP_CACHE=n
The wlk_addr variable is used but not declared under that configuration.

zephyr/subsys/fs/zms/zms.c

Lines 1487 to 1495 in 663da23

#ifdef CONFIG_ZMS_LOOKUP_CACHE
uint64_t wlk_addr = fs->lookup_cache[zms_lookup_cache_pos(id)];
if (wlk_addr == ZMS_LOOKUP_CACHE_NO_ADDR) {
goto no_cached_entry;
}
#else
wlk_addr = fs->ate_wra;
#endif /* CONFIG_ZMS_LOOKUP_CACHE */

Introduced in PR #87792 (commit 42b9b5a)

Regression

  • This is a regression.

Steps to reproduce

No response

Relevant log output

/home/jordan/code/workspace/zephyr/subsys/fs/zms/zms.c: In function ‘zms_write’:
/home/jordan/code/workspace/zephyr/subsys/fs/zms/zms.c:1494:9: error: ‘wlk_addr’ undeclared (first use in this function)
 1494 |         wlk_addr = fs->ate_wra;

Impact

Functional Limitation – Some features not working as expected, but system usable.

Environment

  • Zephyr v4.2, main

Additional Context

No response

Metadata

Metadata

Labels

area: File SystembugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions