[PATCH 017/112] 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 3a4a9fb73149..79d277e35ae1 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 44037bd74c61..2419a96c2365 100644
--- a/include/block.h
+++ b/include/block.h
@@ -35,6 +35,8 @@ struct block_device {
 	struct cdev cdev;
 };
 
+#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