From ba3e33e31a89914b740e9c589e6be3d5f195edfa Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Thu, 28 Sep 2017 14:52:31 +0900 Subject: [PATCH] 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 --- disk/part_efi.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.7.4