From ba4d312d86564591bc71d31d9d716f58f6052c94 Mon Sep 17 00:00:00 2001 From: Armando Date: Wed, 26 Oct 2022 18:22:39 +0800 Subject: [PATCH] flash_mmap: format test_mmap.c --- .../test_apps/flash_mmap/main/test_mmap.c | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/components/spi_flash/test_apps/flash_mmap/main/test_mmap.c b/components/spi_flash/test_apps/flash_mmap/main/test_mmap.c index faf91ee755..0b7322c94e 100644 --- a/components/spi_flash/test_apps/flash_mmap/main/test_mmap.c +++ b/components/spi_flash/test_apps/flash_mmap/main/test_mmap.c @@ -55,7 +55,7 @@ static void setup_mmap_tests(void) printf("Test data partition @ 0x%"PRIx32" - 0x%"PRIx32"\n", start, end); } TEST_ASSERT(end > start); - TEST_ASSERT(end - start >= 512*1024); + TEST_ASSERT(end - start >= 512 * 1024); /* clean up any mmap handles left over from failed tests */ if (handle1) { @@ -232,15 +232,15 @@ TEST_CASE("Can mmap unordered pages into contiguous memory", "[spi_flash][mmap]" int startpage; setup_mmap_tests(); - nopages=(end-start)/SPI_FLASH_MMU_PAGE_SIZE; - pages=alloca(sizeof(int)*nopages); + nopages = (end - start) / SPI_FLASH_MMU_PAGE_SIZE; + pages = alloca(sizeof(int) * nopages); - startpage=start/SPI_FLASH_MMU_PAGE_SIZE; + startpage = start / SPI_FLASH_MMU_PAGE_SIZE; //make inverse mapping: virt 0 -> page (nopages-1), virt 1 -> page (nopages-2), ... - for (int i=0; i