Skip to content

Commit 216dc5d

Browse files
dcpleunggalak
authored andcommitted
kernel: mmu: remove un-needed call to virt_to_bitmap_offset
When marking the reserved region at the end of virtual address space, call virt_to_bitmap_offset() is not needed as we already know the offset. So remove it. Coverity-CID: 235930 Fixes #35160 Signed-off-by: Daniel Leung <daniel.leung@intel.com>
1 parent 6bc42ae commit 216dc5d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/mmu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,6 @@ static void virt_region_init(void)
210210

211211
if (Z_VM_RESERVED > 0) {
212212
/* Mark reserved region at end of virtual address space */
213-
offset = virt_to_bitmap_offset(Z_VIRT_REGION_END_ADDR,
214-
Z_VM_RESERVED);
215213
num_bits = Z_VM_RESERVED / CONFIG_MMU_PAGE_SIZE;
216214
(void)sys_bitarray_set_region(&virt_region_bitmap,
217215
num_bits, 0);

0 commit comments

Comments
 (0)