Skip to content

Commit

Permalink
patch: apply littlefs #253
Browse files Browse the repository at this point in the history
Zephyr wrapper uses 32-bit alignment which is all that's needed.  Remove
the outdated upstream assert.

Upstream: littlefs-project/littlefs#253
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
  • Loading branch information
pabigot committed Aug 2, 2019
2 parents 5e46ade + f85ff1d commit c16e8be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3412,10 +3412,10 @@ static int lfs_init(lfs_t *lfs, const struct lfs_config *cfg) {
lfs_cache_zero(lfs, &lfs->rcache);
lfs_cache_zero(lfs, &lfs->pcache);

// setup lookahead, must be multiple of 64-bits
// setup lookahead, must be multiple of 64-bits, 32-bit aligned
LFS_ASSERT(lfs->cfg->lookahead_size > 0);
LFS_ASSERT(lfs->cfg->lookahead_size % 8 == 0 &&
(uintptr_t)lfs->cfg->lookahead_buffer % 8 == 0);
(uintptr_t)lfs->cfg->lookahead_buffer % 4 == 0);
if (lfs->cfg->lookahead_buffer) {
lfs->free.buffer = lfs->cfg->lookahead_buffer;
} else {
Expand Down

0 comments on commit c16e8be

Please # to comment.