forked from luck/tmp_suning_uos_patched
partitions/efi: some style cleanups
Trivial coding style cleanups - still plenty left. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Davidlohr Bueso <davidlohr@hp.com> Reviewed-by: Karel Zak <kzak@redhat.com> Acked-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
08009b30a7
commit
70f637e90e
|
@ -25,6 +25,9 @@
|
||||||
* TODO:
|
* TODO:
|
||||||
*
|
*
|
||||||
* Changelog:
|
* Changelog:
|
||||||
|
* Mon August 5th, 2013 Davidlohr Bueso <davidlohr@hp.com>
|
||||||
|
* - detect hybrid MBRs, tighter pMBR checking & cleanups.
|
||||||
|
*
|
||||||
* Mon Nov 09 2004 Matt Domsch <Matt_Domsch@dell.com>
|
* Mon Nov 09 2004 Matt Domsch <Matt_Domsch@dell.com>
|
||||||
* - test for valid PMBR and valid PGPT before ever reading
|
* - test for valid PMBR and valid PGPT before ever reading
|
||||||
* AGPT, allow override with 'gpt' kernel command line option.
|
* AGPT, allow override with 'gpt' kernel command line option.
|
||||||
|
@ -289,8 +292,7 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (read_lba(state, le64_to_cpu(gpt->partition_entry_lba),
|
if (read_lba(state, le64_to_cpu(gpt->partition_entry_lba),
|
||||||
(u8 *) pte,
|
(u8 *) pte, count) < count) {
|
||||||
count) < count) {
|
|
||||||
kfree(pte);
|
kfree(pte);
|
||||||
pte=NULL;
|
pte=NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -633,11 +635,8 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt,
|
||||||
*ptes = pptes;
|
*ptes = pptes;
|
||||||
kfree(agpt);
|
kfree(agpt);
|
||||||
kfree(aptes);
|
kfree(aptes);
|
||||||
if (!good_agpt) {
|
if (!good_agpt)
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING "Alternate GPT is invalid, using primary GPT.\n");
|
||||||
"Alternate GPT is invalid, "
|
|
||||||
"using primary GPT.\n");
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (good_agpt) {
|
else if (good_agpt) {
|
||||||
|
@ -645,8 +644,7 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt,
|
||||||
*ptes = aptes;
|
*ptes = aptes;
|
||||||
kfree(pgpt);
|
kfree(pgpt);
|
||||||
kfree(pptes);
|
kfree(pptes);
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING "Primary GPT is invalid, using alternate GPT.\n");
|
||||||
"Primary GPT is invalid, using alternate GPT.\n");
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,8 +706,7 @@ int efi_partition(struct parsed_partitions *state)
|
||||||
put_partition(state, i+1, start * ssz, size * ssz);
|
put_partition(state, i+1, start * ssz, size * ssz);
|
||||||
|
|
||||||
/* If this is a RAID volume, tell md */
|
/* If this is a RAID volume, tell md */
|
||||||
if (!efi_guidcmp(ptes[i].partition_type_guid,
|
if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID))
|
||||||
PARTITION_LINUX_RAID_GUID))
|
|
||||||
state->parts[i + 1].flags = ADDPART_FLAG_RAID;
|
state->parts[i + 1].flags = ADDPART_FLAG_RAID;
|
||||||
|
|
||||||
info = &state->parts[i + 1].info;
|
info = &state->parts[i + 1].info;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user