Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Doyle <joethedoyle@gmail.com>2020-01-03 00:46:07 +0300
committerJoe Doyle <joethedoyle@gmail.com>2020-01-03 00:46:07 +0300
commit626006af0caefc0ad3f1749ceb06410e5704d130 (patch)
tree99ab79ecaa20a5315dd02bacc9c4a829b4d3975f /lfs_util.h
parentce2c01f098f4d2b9479de5a796c3bb531f1fe14c (diff)
Fix incorrect comment on `lfs_npw2`
`lfs_npw2` returns a value v such that `2^v >= a` and `2^(v-1) < a`, but the previous comment incorrectly describes it as "less than or equal to a".
Diffstat (limited to 'lfs_util.h')
-rw-r--r--lfs_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs_util.h b/lfs_util.h
index 80fab55..696876f 100644
--- a/lfs_util.h
+++ b/lfs_util.h
@@ -107,7 +107,7 @@ static inline uint32_t lfs_alignup(uint32_t a, uint32_t alignment) {
return lfs_aligndown(a + alignment-1, alignment);
}
-// Find the next smallest power of 2 less than or equal to a
+// Find the smallest power of 2 greater than or equal to a
static inline uint32_t lfs_npw2(uint32_t a) {
#if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM))
return 32 - __builtin_clz(a-1);