part_efi: don't build the dead code for checking gpt validation 67/153267/3
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 28 Sep 2017 05:52:31 +0000 (14:52 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Sep 2017 09:58:06 +0000 (18:58 +0900)
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 <jh80.chung@samsung.com>
disk/part_efi.c

index 4458d88..5a4f20b 100644 (file)
@@ -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