[PATCH v2 017/113] block: define BLOCKSIZE globally in block.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For use by EFI loader code that needs to report block size, export the
BLOCKSIZE macro.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux