[PATCH V2 1/4] block: define parsed_partitions.flags as 'unsigned char'

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

 



So far, only 3 partition flags are used, it is enough to hold it in
'unsigned char'.

Cc: Ewan Milne <emilne@xxxxxxxxxx>
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
---
 block/partitions/check.h | 2 +-
 block/partitions/core.c  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/block/partitions/check.h b/block/partitions/check.h
index c577e9ee67f0..8f0ceed06c7b 100644
--- a/block/partitions/check.h
+++ b/block/partitions/check.h
@@ -14,7 +14,7 @@ struct parsed_partitions {
 	struct {
 		sector_t from;
 		sector_t size;
-		int flags;
+		unsigned char flags;
 		bool has_info;
 		struct partition_meta_info info;
 	} *parts;
diff --git a/block/partitions/core.c b/block/partitions/core.c
index f3d9ff2cafb6..430ff7863556 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -314,7 +314,8 @@ static DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
  * after all disk users are gone.
  */
 static struct block_device *add_partition(struct gendisk *disk, int partno,
-				sector_t start, sector_t len, int flags,
+				sector_t start, sector_t len,
+				unsigned char flags,
 				struct partition_meta_info *info)
 {
 	dev_t devt = MKDEV(0, 0);
-- 
2.29.2




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux