Skip to content

Commit dce14c2

Browse files
Fabian Frederickaxboe
authored andcommitted
block/partitions/msdos.c: code clean-up
checkpatch fixing: WARNING: Missing a blank line after declarations WARNING: space prohibited between function name and open parenthesis '(' ERROR: spaces required around that '<' (ctx:VxV) Cc: Jens Axboe <axboe@kernel.dk> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 600ffc5 commit dce14c2

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎block/partitions/msdos.c‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ static void parse_extended(struct parsed_partitions *state,
159159
/*
160160
* First process the data partition(s)
161161
*/
162-
for (i=0; i<4; i++, p++) {
162+
for (i = 0; i < 4; i++, p++) {
163163
sector_t offs, size, next;
164+
164165
if (!nr_sects(p) || is_extended_partition(p))
165166
continue;
166167

@@ -194,7 +195,7 @@ static void parse_extended(struct parsed_partitions *state,
194195
* It should be a link to the next logical partition.
195196
*/
196197
p -= 4;
197-
for (i=0; i<4; i++, p++)
198+
for (i = 0; i < 4; i++, p++)
198199
if (nr_sects(p) && is_extended_partition(p))
199200
break;
200201
if (i == 4)
@@ -243,8 +244,8 @@ static void parse_solaris_x86(struct parsed_partitions *state,
243244
return;
244245
}
245246
/* Ensure we can handle previous case of VTOC with 8 entries gracefully */
246-
max_nparts = le16_to_cpu (v->v_nparts) > 8 ? SOLARIS_X86_NUMSLICE : 8;
247-
for (i=0; i<max_nparts && state->next<state->limit; i++) {
247+
max_nparts = le16_to_cpu(v->v_nparts) > 8 ? SOLARIS_X86_NUMSLICE : 8;
248+
for (i = 0; i < max_nparts && state->next < state->limit; i++) {
248249
struct solaris_x86_slice *s = &v->v_slice[i];
249250
char tmp[3 + 10 + 1 + 1];
250251

@@ -409,7 +410,7 @@ static void parse_minix(struct parsed_partitions *state,
409410
/* The first sector of a Minix partition can have either
410411
* a secondary MBR describing its subpartitions, or
411412
* the normal boot sector. */
412-
if (msdos_magic_present (data + 510) &&
413+
if (msdos_magic_present(data + 510) &&
413414
SYS_IND(p) == MINIX_PARTITION) { /* subpartition table present */
414415
char tmp[1 + BDEVNAME_SIZE + 10 + 9 + 1];
415416

@@ -527,6 +528,7 @@ int msdos_partition(struct parsed_partitions *state)
527528
for (slot = 1 ; slot <= 4 ; slot++, p++) {
528529
sector_t start = start_sect(p)*sector_size;
529530
sector_t size = nr_sects(p)*sector_size;
531+
530532
if (!size)
531533
continue;
532534
if (is_extended_partition(p)) {
@@ -537,6 +539,7 @@ int msdos_partition(struct parsed_partitions *state)
537539
* sector, although it may not be enough/proper.
538540
*/
539541
sector_t n = 2;
542+
540543
n = min(size, max(sector_size, n));
541544
put_partition(state, slot, start, n);
542545

0 commit comments

Comments
 (0)