Skip to content

Commit 79199e2

Browse files
zhaoxingyu12xiaoxiang781216
authored andcommitted
mtd/nvs: fix align size
when gc, move data requires byte alignment Signed-off-by: zhaoxingyu1 <[email protected]>
1 parent 8e5f6de commit 79199e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/mtd_config_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
* so we make a buffer to do compare or move.
6363
*/
6464

65-
#define NVS_BUFFER_SIZE 32
65+
#define NVS_BUFFER_SIZE MAX(NVS_ALIGN_UP(32), NVS_ALIGN_SIZE)
6666

6767
/* If data is written after last ate, and power loss happens,
6868
* we need to find a clean offset by skipping dirty data.

0 commit comments

Comments
 (0)