[PATCH v2 017/113] block: define BLOCKSIZE globally in block.h
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Mar 4 10:59:02 PST 2024
For use by EFI loader code that needs to report block size, export the
BLOCKSIZE macro.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/block.c | 2 --
include/block.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/block.c b/common/block.c
index 98ed67e96674..faf0e7c0cbe5 100644
--- a/common/block.c
+++ b/common/block.c
@@ -13,8 +13,6 @@
#include <dma.h>
#include <file-list.h>
-#define BLOCKSIZE(blk) (1 << blk->blockbits)
-
LIST_HEAD(block_device_list);
/* a chunk of contiguous data */
diff --git a/include/block.h b/include/block.h
index aaaa97400f3a..e27579cdbd49 100644
--- a/include/block.h
+++ b/include/block.h
@@ -37,6 +37,8 @@ struct block_device {
bool need_reparse;
};
+#define BLOCKSIZE(blk) (1u << (blk)->blockbits)
+
extern struct list_head block_device_list;
#define for_each_block_device(bdev) list_for_each_entry(bdev, &block_device_list, list)
--
2.39.2
More information about the barebox
mailing list