diff options
| author | Davidlohr Bueso <davidlohr@hp.com> | 2013-09-11 17:25:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:59:19 -0400 |
| commit | 70f637e90ea96187530365eb1ddff8d483ba460e (patch) | |
| tree | 1261227fa1fe952b69d5d86bbe44f9862b529715 /block/partitions | |
| parent | 08009b30a71d9a7c252c4bd677dbd496af9dd1a2 (diff) | |
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>
Diffstat (limited to 'block/partitions')
| -rw-r--r-- | block/partitions/efi.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/block/partitions/efi.c b/block/partitions/efi.c index de9f9bfa24bc..0df535fac0aa 100644 --- a/block/partitions/efi.c +++ b/block/partitions/efi.c | |||
| @@ -25,6 +25,9 @@ | |||
| 25 | * TODO: | 25 | * TODO: |
| 26 | * | 26 | * |
| 27 | * Changelog: | 27 | * Changelog: |
| 28 | * Mon August 5th, 2013 Davidlohr Bueso <davidlohr@hp.com> | ||
| 29 | * - detect hybrid MBRs, tighter pMBR checking & cleanups. | ||
| 30 | * | ||
| 28 | * Mon Nov 09 2004 Matt Domsch <Matt_Domsch@dell.com> | 31 | * Mon Nov 09 2004 Matt Domsch <Matt_Domsch@dell.com> |
| 29 | * - test for valid PMBR and valid PGPT before ever reading | 32 | * - test for valid PMBR and valid PGPT before ever reading |
| 30 | * AGPT, allow override with 'gpt' kernel command line option. | 33 | * AGPT, allow override with 'gpt' kernel command line option. |
| @@ -289,8 +292,7 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state, | |||
| 289 | return NULL; | 292 | return NULL; |
| 290 | 293 | ||
| 291 | if (read_lba(state, le64_to_cpu(gpt->partition_entry_lba), | 294 | if (read_lba(state, le64_to_cpu(gpt->partition_entry_lba), |
| 292 | (u8 *) pte, | 295 | (u8 *) pte, count) < count) { |
| 293 | count) < count) { | ||
| 294 | kfree(pte); | 296 | kfree(pte); |
| 295 | pte=NULL; | 297 | pte=NULL; |
| 296 | return NULL; | 298 | return NULL; |
| @@ -633,11 +635,8 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt, | |||
| 633 | *ptes = pptes; | 635 | *ptes = pptes; |
| 634 | kfree(agpt); | 636 | kfree(agpt); |
| 635 | kfree(aptes); | 637 | kfree(aptes); |
| 636 | if (!good_agpt) { | 638 | if (!good_agpt) |
| 637 | printk(KERN_WARNING | 639 | printk(KERN_WARNING "Alternate GPT is invalid, using primary GPT.\n"); |
| 638 | "Alternate GPT is invalid, " | ||
| 639 | "using primary GPT.\n"); | ||
| 640 | } | ||
| 641 | return 1; | 640 | return 1; |
| 642 | } | 641 | } |
| 643 | else if (good_agpt) { | 642 | else if (good_agpt) { |
| @@ -645,8 +644,7 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt, | |||
| 645 | *ptes = aptes; | 644 | *ptes = aptes; |
| 646 | kfree(pgpt); | 645 | kfree(pgpt); |
| 647 | kfree(pptes); | 646 | kfree(pptes); |
| 648 | printk(KERN_WARNING | 647 | printk(KERN_WARNING "Primary GPT is invalid, using alternate GPT.\n"); |
| 649 | "Primary GPT is invalid, using alternate GPT.\n"); | ||
| 650 | return 1; | 648 | return 1; |
| 651 | } | 649 | } |
| 652 | 650 | ||
| @@ -708,8 +706,7 @@ int efi_partition(struct parsed_partitions *state) | |||
| 708 | put_partition(state, i+1, start * ssz, size * ssz); | 706 | put_partition(state, i+1, start * ssz, size * ssz); |
| 709 | 707 | ||
| 710 | /* If this is a RAID volume, tell md */ | 708 | /* If this is a RAID volume, tell md */ |
| 711 | if (!efi_guidcmp(ptes[i].partition_type_guid, | 709 | if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID)) |
| 712 | PARTITION_LINUX_RAID_GUID)) | ||
| 713 | state->parts[i + 1].flags = ADDPART_FLAG_RAID; | 710 | state->parts[i + 1].flags = ADDPART_FLAG_RAID; |
| 714 | 711 | ||
| 715 | info = &state->parts[i + 1].info; | 712 | info = &state->parts[i + 1].info; |
