mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <davidlohr@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>, Jens Axboe <axboe@kernel.dk>
Cc: Matt Domsch <Matt_Domsch@dell.com>, Jim Hull <jim.hull@hp.com>,
	Karel Zak <kzak@redhat.com>, Peter Jones <pjones@redhat.com>,
	Chegu Vinod <chegu_vinod@hp.com>,
	Aswin Chandramouleeswaran <aswin@hp.com>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <davidlohr@hp.com>
Subject: [PATCH 8/8] partitions/efi: some style cleanups
Date: Mon,  5 Aug 2013 22:21:16 -0700	[thread overview]
Message-ID: <1375766476-4204-9-git-send-email-davidlohr@hp.com> (raw)
In-Reply-To: <1375766476-4204-1-git-send-email-davidlohr@hp.com>

Trivial coding style cleanups - still plenty left.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
---
 block/partitions/efi.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index 9a81c3b..8e6d77e 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -25,6 +25,9 @@
  * TODO:
  *
  * 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>
  * - test for valid PMBR and valid PGPT before ever reading
  *   AGPT, allow override with 'gpt' kernel command line option.
@@ -288,8 +291,7 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state,
 		return NULL;
 
 	if (read_lba(state, le64_to_cpu(gpt->partition_entry_lba),
-                     (u8 *) pte,
-		     count) < count) {
+                     (u8 *) pte, count) < count) {
 		kfree(pte);
                 pte=NULL;
 		return NULL;
@@ -613,8 +615,7 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt,
 	good_pgpt = is_gpt_valid(state, GPT_PRIMARY_PARTITION_TABLE_LBA,
 				 &pgpt, &pptes);
         if (good_pgpt)
-		good_agpt = is_gpt_valid(state,
-					 le64_to_cpu(pgpt->alternate_lba),
+		good_agpt = is_gpt_valid(state, le64_to_cpu(pgpt->alternate_lba),
 					 &agpt, &aptes);
         if (!good_agpt && force_gpt)
                 good_agpt = is_gpt_valid(state, lastlba, &agpt, &aptes);
@@ -632,9 +633,7 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt,
                 kfree(agpt);
                 kfree(aptes);
                 if (!good_agpt) {
-                        printk(KERN_WARNING 
-			       "Alternate GPT is invalid, "
-                               "using primary GPT.\n");
+                        printk(KERN_WARNING "Alternate GPT is invalid, using primary GPT.\n");
                 }
                 return 1;
         }
@@ -643,8 +642,7 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt,
                 *ptes = aptes;
                 kfree(pgpt);
                 kfree(pptes);
-                printk(KERN_WARNING 
-                       "Primary GPT is invalid, using alternate GPT.\n");
+                printk(KERN_WARNING "Primary GPT is invalid, using alternate GPT.\n");
                 return 1;
         }
 
@@ -706,8 +704,7 @@ int efi_partition(struct parsed_partitions *state)
 		put_partition(state, i+1, start * ssz, size * ssz);
 
 		/* If this is a RAID volume, tell md */
-		if (!efi_guidcmp(ptes[i].partition_type_guid,
-				 PARTITION_LINUX_RAID_GUID))
+		if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID))
 			state->parts[i + 1].flags = ADDPART_FLAG_RAID;
 
 		info = &state->parts[i + 1].info;
-- 
1.7.11.7


  parent reply	other threads:[~2013-08-06  5:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06  5:21 [PATCH 0/8] partitions/efi: detect hybrid mbrs Davidlohr Bueso
2013-08-06  5:21 ` [PATCH 1/8] partitions/efi: use lba-aware partition records Davidlohr Bueso
2013-09-02 10:10   ` Karel Zak
2013-09-03  5:01     ` Davidlohr Bueso
2013-08-06  5:21 ` [PATCH 2/8] partitions/efi: check pmbr record's starting lba Davidlohr Bueso
2013-08-06  5:21 ` [PATCH 3/8] partitions/efi: do not require gpt partition to begin at sector 1 Davidlohr Bueso
2013-08-06  5:21 ` [PATCH 4/8] partitions/efi: detect hybrid MBRs Davidlohr Bueso
2013-08-06  5:21 ` [PATCH 5/8] partitions/efi: account for pmbr size in lba Davidlohr Bueso
2013-08-06  5:21 ` [PATCH 6/8] partitions/efi: compare first and last usable LBAs Davidlohr Bueso
2013-08-06  5:21 ` [PATCH 7/8] partitions/efi: delete annoying emacs style comments Davidlohr Bueso
2013-08-06  5:21 ` Davidlohr Bueso [this message]
2013-08-06 21:16 ` [PATCH 0/8] partitions/efi: detect hybrid mbrs Andrew Morton
2013-08-06 22:39   ` Davidlohr Bueso
2013-08-15 16:59   ` Davidlohr Bueso
2013-08-15 19:29     ` Andrew Morton
2013-08-16  1:37       ` Davidlohr Bueso
2013-09-02 10:33         ` Karel Zak
2013-09-03 12:33         ` Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375766476-4204-9-git-send-email-davidlohr@hp.com \
    --to=davidlohr@hp.com \
    --cc=Matt_Domsch@dell.com \
    --cc=akpm@linux-foundation.org \
    --cc=aswin@hp.com \
    --cc=axboe@kernel.dk \
    --cc=chegu_vinod@hp.com \
    --cc=jim.hull@hp.com \
    --cc=kzak@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®