Skip to content

Commit b1e7a4b

Browse files
cyrillosLinus Torvalds
authored andcommitted
UDF: coding style fixups
This patch does additional coding style fixup. Initially the code is being distorted by Lindent (in my patches sent not very long ago) and fixed in the followup patches but this stuff was accidently missed. New and old compiled files were compared with cmp to check for being identically. So the patch will not break the kernel. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8d7b52d commit b1e7a4b

2 files changed

Lines changed: 23 additions & 36 deletions

File tree

‎fs/udf/super.c‎

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,7 @@ static int udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
913913
UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table =
914914
udf_iget(sb, loc);
915915
if (!UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table) {
916-
udf_debug("cannot load unallocSpaceTable (part %d)\n",
917-
i);
916+
udf_debug("cannot load unallocSpaceTable (part %d)\n", i);
918917
return 1;
919918
}
920919
UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_UNALLOC_TABLE;
@@ -944,8 +943,7 @@ static int udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
944943
UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table =
945944
udf_iget(sb, loc);
946945
if (!UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table) {
947-
udf_debug("cannot load freedSpaceTable (part %d)\n",
948-
i);
946+
udf_debug("cannot load freedSpaceTable (part %d)\n", i);
949947
return 1;
950948
}
951949
UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_FREED_TABLE;
@@ -1293,19 +1291,16 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
12931291

12941292
if (!UDF_SB_LASTBLOCK(sb)) {
12951293
udf_debug("Unable to determine Lastblock (For "
1296-
"Virtual Partition)\n");
1294+
"Virtual Partition)\n");
12971295
return 1;
12981296
}
12991297

13001298
for (j = 0; j < UDF_SB_NUMPARTS(sb); j++) {
1301-
if (j != i && UDF_SB_PARTVSN(sb, i) ==
1302-
UDF_SB_PARTVSN(sb, j) &&
1303-
UDF_SB_PARTNUM(sb, i) ==
1304-
UDF_SB_PARTNUM(sb, j)) {
1299+
if (j != i &&
1300+
UDF_SB_PARTVSN(sb, i) == UDF_SB_PARTVSN(sb, j) &&
1301+
UDF_SB_PARTNUM(sb, i) == UDF_SB_PARTNUM(sb, j)) {
13051302
ino.partitionReferenceNum = j;
1306-
ino.logicalBlockNum =
1307-
UDF_SB_LASTBLOCK(sb) -
1308-
UDF_SB_PARTROOT(sb, j);
1303+
ino.logicalBlockNum = UDF_SB_LASTBLOCK(sb) - UDF_SB_PARTROOT(sb, j);
13091304
break;
13101305
}
13111306
}
@@ -1318,9 +1313,9 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
13181313

13191314
if (UDF_SB_PARTTYPE(sb, i) == UDF_VIRTUAL_MAP15) {
13201315
UDF_SB_TYPEVIRT(sb, i).s_start_offset =
1321-
udf_ext0_offset(UDF_SB_VAT(sb));
1316+
udf_ext0_offset(UDF_SB_VAT(sb));
13221317
UDF_SB_TYPEVIRT(sb, i).s_num_entries =
1323-
(UDF_SB_VAT(sb)->i_size - 36) >> 2;
1318+
(UDF_SB_VAT(sb)->i_size - 36) >> 2;
13241319
} else if (UDF_SB_PARTTYPE(sb, i) == UDF_VIRTUAL_MAP20) {
13251320
struct buffer_head *bh = NULL;
13261321
uint32_t pos;
@@ -1330,19 +1325,15 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
13301325
if (!bh)
13311326
return 1;
13321327
UDF_SB_TYPEVIRT(sb, i).s_start_offset =
1333-
le16_to_cpu(((struct
1334-
virtualAllocationTable20 *)bh->b_data +
1335-
udf_ext0_offset(UDF_SB_VAT(sb)))->
1336-
lengthHeader) +
1337-
udf_ext0_offset(UDF_SB_VAT(sb));
1338-
UDF_SB_TYPEVIRT(sb, i).s_num_entries =
1339-
(UDF_SB_VAT(sb)->i_size -
1340-
UDF_SB_TYPEVIRT(sb, i).s_start_offset) >> 2;
1328+
le16_to_cpu(((struct virtualAllocationTable20 *)bh->b_data +
1329+
udf_ext0_offset(UDF_SB_VAT(sb)))->lengthHeader) +
1330+
udf_ext0_offset(UDF_SB_VAT(sb));
1331+
UDF_SB_TYPEVIRT(sb, i).s_num_entries = (UDF_SB_VAT(sb)->i_size -
1332+
UDF_SB_TYPEVIRT(sb, i).s_start_offset) >> 2;
13411333
brelse(bh);
13421334
}
13431335
UDF_SB_PARTROOT(sb, i) = udf_get_pblock(sb, 0, i, 0);
1344-
UDF_SB_PARTLEN(sb, i) = UDF_SB_PARTLEN(sb,
1345-
ino.partitionReferenceNum);
1336+
UDF_SB_PARTLEN(sb, i) = UDF_SB_PARTLEN(sb, ino.partitionReferenceNum);
13461337
}
13471338
}
13481339
return 0;
@@ -1357,21 +1348,17 @@ static void udf_open_lvid(struct super_block *sb)
13571348
UDF_SB_LVIDIU(sb)->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX;
13581349
UDF_SB_LVIDIU(sb)->impIdent.identSuffix[1] = UDF_OS_ID_LINUX;
13591350
if (udf_time_to_stamp(&cpu_time, CURRENT_TIME))
1360-
UDF_SB_LVID(sb)->recordingDateAndTime =
1361-
cpu_to_lets(cpu_time);
1351+
UDF_SB_LVID(sb)->recordingDateAndTime = cpu_to_lets(cpu_time);
13621352
UDF_SB_LVID(sb)->integrityType = LVID_INTEGRITY_TYPE_OPEN;
13631353

1364-
UDF_SB_LVID(sb)->descTag.descCRC =
1365-
cpu_to_le16(udf_crc((char *)UDF_SB_LVID(sb) + sizeof(tag),
1366-
le16_to_cpu(UDF_SB_LVID(sb)->descTag.
1367-
descCRCLength), 0));
1354+
UDF_SB_LVID(sb)->descTag.descCRC = cpu_to_le16(udf_crc((char *)UDF_SB_LVID(sb) + sizeof(tag),
1355+
le16_to_cpu(UDF_SB_LVID(sb)->descTag.descCRCLength), 0));
13681356

13691357
UDF_SB_LVID(sb)->descTag.tagChecksum = 0;
13701358
for (i = 0; i < 16; i++)
13711359
if (i != 4)
13721360
UDF_SB_LVID(sb)->descTag.tagChecksum +=
1373-
((uint8_t *) &
1374-
(UDF_SB_LVID(sb)->descTag))[i];
1361+
((uint8_t *) &(UDF_SB_LVID(sb)->descTag))[i];
13751362

13761363
mark_buffer_dirty(UDF_SB_LVIDBH(sb));
13771364
}

‎fs/udf/udftime.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ time_t *udf_stamp_to_time(time_t *dest, long *dest_usec, kernel_timestamp src)
108108
*dest = year_seconds[src.year - EPOCH_YEAR];
109109
*dest -= offset * 60;
110110

111-
yday = ((__mon_yday[__isleap (src.year)]
112-
[src.month - 1]) + (src.day - 1));
113-
*dest += ( ( (yday * 24) + src.hour ) * 60 + src.minute ) * 60 + src.second;
114-
*dest_usec = src.centiseconds * 10000 + src.hundredsOfMicroseconds * 100 + src.microseconds;
111+
yday = ((__mon_yday[__isleap(src.year)][src.month - 1]) + src.day - 1);
112+
*dest += (((yday * 24) + src.hour) * 60 + src.minute) * 60 + src.second;
113+
*dest_usec = src.centiseconds * 10000 +
114+
src.hundredsOfMicroseconds * 100 + src.microseconds;
115115
return dest;
116116
}
117117

0 commit comments

Comments
 (0)