From: Jaehoon Chung Date: Thu, 28 Sep 2017 05:52:31 +0000 (+0900) Subject: part_efi: don't build the dead code for checking gpt validation X-Git-Tag: accepted/tizen/4.0/unified/20171017.210954~7 X-Git-Url: http://review.tizen.org/git/?p=profile%2Fmobile%2Fplatform%2Fkernel%2Fu-boot-tm1.git;a=commitdiff_plain;h=ba3e33e31a89914b740e9c589e6be3d5f195edfa part_efi: don't build the dead code for checking gpt validation format_gpt_valid() isn't call anywhere. It means that code is dead. In future, someone want to use it, just add the configuration as CONFIG_GPT_FORMAT_VALID. Change-Id: Id6fdcbd0b1e0530779649096637f488024709c2a Signed-off-by: Jaehoon Chung --- diff --git a/disk/part_efi.c b/disk/part_efi.c index 4458d88..5a4f20b 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -95,10 +95,12 @@ static int is_pmbr_valid(legacy_mbr * mbr); static int is_gpt_valid(block_dev_desc_t * dev_desc, unsigned long long lba, gpt_header * pgpt_head, gpt_entry ** pgpt_pte); +#ifdef CONFIG_GPT_FORMAT_VALID #ifdef CONFIG_EMMC_BOOT static int format_gpt_valid(block_dev_desc_t * dev_desc, unsigned long long lba, gpt_header * pgpt_head, gpt_entry ** pgpt_pte); #endif +#endif /* CONFIG_GPT_FORMAT_VALID */ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc, gpt_header * pgpt_head); @@ -586,6 +588,7 @@ static int is_gpt_valid(block_dev_desc_t * dev_desc, unsigned long long lba, return 1; } +#ifdef CONFIG_GPT_FORMAT_VALID #ifdef CONFIG_EMMC_BOOT /** * format_gpt_valid() - tests one GPT header and PTEs for validity @@ -702,6 +705,7 @@ static int format_gpt_valid(block_dev_desc_t * dev_desc, unsigned long long lba, return 1; } #endif +#endif /* CONFIG_GPT_FORMAT_VALID */ /** * alloc_read_gpt_entries(): reads partition entries from disk