From: Simon Glass <simon.glass@canonical.com> Add SECTOR_SHIFT and SECTOR_SIZE definitions to include/linux/blk_types.h where they belong with other block layer types, matching Linux kernel organisation. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 4 +--- include/linux/blk_types.h | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 0a1b7406127..f3b1aaaa408 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1611,9 +1611,7 @@ int bh_read(struct buffer_head *bh, int flags); ({ (void)(bdev); (void)(s); (void)(n); (void)(gfp); 0; }) #define blkdev_issue_zeroout(bdev, s, n, gfp, f) \ ({ (void)(bdev); (void)(s); (void)(n); (void)(gfp); (void)(f); 0; }) -#ifndef SECTOR_SHIFT -#define SECTOR_SHIFT 9 -#endif +/* SECTOR_SHIFT, SECTOR_SIZE are in linux/blk_types.h */ /* mapping_max_folio_order is in linux/pagemap.h */ /* Memory allocation for journal.c */ diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index a842300ae64..1c3c7c99e48 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -12,6 +12,14 @@ #include <linux/types.h> +/* Sector size definitions */ +#ifndef SECTOR_SHIFT +#define SECTOR_SHIFT 9 +#endif +#ifndef SECTOR_SIZE +#define SECTOR_SIZE (1 << SECTOR_SHIFT) +#endif + /* Block I/O operation flags */ typedef __u32 __bitwise blk_opf_t; -- 2.43.0