Commit a983f368f8986c1ecb64f2947fcf594343130215
Committed by
Jan Kara
1 parent
c2bff36c29
Exists in
master
and in
6 other branches
udf: Neaten udf_debug uses
Just whitespace and argument alignment. Introduce some checkpatch warnings that deserve to be ignored. Reviewed-by: NamJae Jeon <linkinjeon@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jan Kara <jack@suse.cz>
Showing 6 changed files with 50 additions and 59 deletions Side-by-side Diff
fs/udf/balloc.c
... | ... | @@ -59,8 +59,8 @@ |
59 | 59 | int nr_groups = bitmap->s_nr_groups; |
60 | 60 | |
61 | 61 | if (block_group >= nr_groups) { |
62 | - udf_debug("block_group (%d) > nr_groups (%d)\n", block_group, | |
63 | - nr_groups); | |
62 | + udf_debug("block_group (%d) > nr_groups (%d)\n", | |
63 | + block_group, nr_groups); | |
64 | 64 | } |
65 | 65 | |
66 | 66 | if (bitmap->s_block_bitmap[block_group]) { |
... | ... | @@ -126,8 +126,9 @@ |
126 | 126 | if (bloc->logicalBlockNum + count < count || |
127 | 127 | (bloc->logicalBlockNum + count) > partmap->s_partition_len) { |
128 | 128 | udf_debug("%d < %d || %d + %d > %d\n", |
129 | - bloc->logicalBlockNum, 0, bloc->logicalBlockNum, | |
130 | - count, partmap->s_partition_len); | |
129 | + bloc->logicalBlockNum, 0, | |
130 | + bloc->logicalBlockNum, count, | |
131 | + partmap->s_partition_len); | |
131 | 132 | goto error_return; |
132 | 133 | } |
133 | 134 | |
... | ... | @@ -155,7 +156,7 @@ |
155 | 156 | if (udf_set_bit(bit + i, bh->b_data)) { |
156 | 157 | udf_debug("bit %ld already set\n", bit + i); |
157 | 158 | udf_debug("byte=%2x\n", |
158 | - ((char *)bh->b_data)[(bit + i) >> 3]); | |
159 | + ((char *)bh->b_data)[(bit + i) >> 3]); | |
159 | 160 | } |
160 | 161 | } |
161 | 162 | udf_add_free_space(sb, sbi->s_partition, count); |
... | ... | @@ -369,7 +370,8 @@ |
369 | 370 | if (bloc->logicalBlockNum + count < count || |
370 | 371 | (bloc->logicalBlockNum + count) > partmap->s_partition_len) { |
371 | 372 | udf_debug("%d < %d || %d + %d > %d\n", |
372 | - bloc->logicalBlockNum, 0, bloc->logicalBlockNum, count, | |
373 | + bloc->logicalBlockNum, 0, | |
374 | + bloc->logicalBlockNum, count, | |
373 | 375 | partmap->s_partition_len); |
374 | 376 | goto error_return; |
375 | 377 | } |
fs/udf/directory.c
fs/udf/inode.c
... | ... | @@ -1985,8 +1985,7 @@ |
1985 | 1985 | *elen = le32_to_cpu(lad->extLength) & UDF_EXTENT_LENGTH_MASK; |
1986 | 1986 | break; |
1987 | 1987 | default: |
1988 | - udf_debug("alloc_type = %d unsupported\n", | |
1989 | - iinfo->i_alloc_type); | |
1988 | + udf_debug("alloc_type = %d unsupported\n", iinfo->i_alloc_type); | |
1990 | 1989 | return -1; |
1991 | 1990 | } |
1992 | 1991 |
fs/udf/lowlevel.c
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | |
39 | 39 | if (i == 0) { |
40 | 40 | udf_debug("XA disk: %s, vol_desc_start=%d\n", |
41 | - (ms_info.xa_flag ? "yes" : "no"), ms_info.addr.lba); | |
41 | + ms_info.xa_flag ? "yes" : "no", ms_info.addr.lba); | |
42 | 42 | if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */ |
43 | 43 | vol_desc_start = ms_info.addr.lba; |
44 | 44 | } else { |
fs/udf/partition.c
... | ... | @@ -33,8 +33,8 @@ |
33 | 33 | struct udf_sb_info *sbi = UDF_SB(sb); |
34 | 34 | struct udf_part_map *map; |
35 | 35 | if (partition >= sbi->s_partitions) { |
36 | - udf_debug("block=%d, partition=%d, offset=%d: " | |
37 | - "invalid partition\n", block, partition, offset); | |
36 | + udf_debug("block=%d, partition=%d, offset=%d: invalid partition\n", | |
37 | + block, partition, offset); | |
38 | 38 | return 0xFFFFFFFF; |
39 | 39 | } |
40 | 40 | map = &sbi->s_partmaps[partition]; |
... | ... | @@ -60,8 +60,8 @@ |
60 | 60 | vdata = &map->s_type_specific.s_virtual; |
61 | 61 | |
62 | 62 | if (block > vdata->s_num_entries) { |
63 | - udf_debug("Trying to access block beyond end of VAT " | |
64 | - "(%d max %d)\n", block, vdata->s_num_entries); | |
63 | + udf_debug("Trying to access block beyond end of VAT (%d max %d)\n", | |
64 | + block, vdata->s_num_entries); | |
65 | 65 | return 0xFFFFFFFF; |
66 | 66 | } |
67 | 67 |
fs/udf/super.c
... | ... | @@ -639,20 +639,16 @@ |
639 | 639 | udf_debug("ISO9660 Boot Record found\n"); |
640 | 640 | break; |
641 | 641 | case 1: |
642 | - udf_debug("ISO9660 Primary Volume Descriptor " | |
643 | - "found\n"); | |
642 | + udf_debug("ISO9660 Primary Volume Descriptor found\n"); | |
644 | 643 | break; |
645 | 644 | case 2: |
646 | - udf_debug("ISO9660 Supplementary Volume " | |
647 | - "Descriptor found\n"); | |
645 | + udf_debug("ISO9660 Supplementary Volume Descriptor found\n"); | |
648 | 646 | break; |
649 | 647 | case 3: |
650 | - udf_debug("ISO9660 Volume Partition Descriptor " | |
651 | - "found\n"); | |
648 | + udf_debug("ISO9660 Volume Partition Descriptor found\n"); | |
652 | 649 | break; |
653 | 650 | case 255: |
654 | - udf_debug("ISO9660 Volume Descriptor Set " | |
655 | - "Terminator found\n"); | |
651 | + udf_debug("ISO9660 Volume Descriptor Set Terminator found\n"); | |
656 | 652 | break; |
657 | 653 | default: |
658 | 654 | udf_debug("ISO9660 VRS (%u) found\n", |
... | ... | @@ -803,8 +799,7 @@ |
803 | 799 | pvoldesc->recordingDateAndTime)) { |
804 | 800 | #ifdef UDFFS_DEBUG |
805 | 801 | struct timestamp *ts = &pvoldesc->recordingDateAndTime; |
806 | - udf_debug("recording time %04u/%02u/%02u" | |
807 | - " %02u:%02u (%x)\n", | |
802 | + udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n", | |
808 | 803 | le16_to_cpu(ts->year), ts->month, ts->day, ts->hour, |
809 | 804 | ts->minute, le16_to_cpu(ts->typeAndTimezone)); |
810 | 805 | #endif |
... | ... | @@ -815,7 +810,7 @@ |
815 | 810 | strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name, |
816 | 811 | outstr->u_len > 31 ? 31 : outstr->u_len); |
817 | 812 | udf_debug("volIdent[] = '%s'\n", |
818 | - UDF_SB(sb)->s_volume_ident); | |
813 | + UDF_SB(sb)->s_volume_ident); | |
819 | 814 | } |
820 | 815 | |
821 | 816 | if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) |
... | ... | @@ -847,7 +842,7 @@ |
847 | 842 | addr.partitionReferenceNum = map->s_partition_num; |
848 | 843 | |
849 | 844 | udf_debug("Metadata file location: block = %d part = %d\n", |
850 | - addr.logicalBlockNum, addr.partitionReferenceNum); | |
845 | + addr.logicalBlockNum, addr.partitionReferenceNum); | |
851 | 846 | |
852 | 847 | mdata->s_metadata_fe = udf_iget(sb, &addr); |
853 | 848 | |
... | ... | @@ -867,7 +862,7 @@ |
867 | 862 | addr.partitionReferenceNum = map->s_partition_num; |
868 | 863 | |
869 | 864 | udf_debug("Mirror metadata file location: block = %d part = %d\n", |
870 | - addr.logicalBlockNum, addr.partitionReferenceNum); | |
865 | + addr.logicalBlockNum, addr.partitionReferenceNum); | |
871 | 866 | |
872 | 867 | mdata->s_mirror_fe = udf_iget(sb, &addr); |
873 | 868 | |
... | ... | @@ -896,7 +891,7 @@ |
896 | 891 | addr.partitionReferenceNum = map->s_partition_num; |
897 | 892 | |
898 | 893 | udf_debug("Bitmap file location: block = %d part = %d\n", |
899 | - addr.logicalBlockNum, addr.partitionReferenceNum); | |
894 | + addr.logicalBlockNum, addr.partitionReferenceNum); | |
900 | 895 | |
901 | 896 | mdata->s_bitmap_fe = udf_iget(sb, &addr); |
902 | 897 | |
... | ... | @@ -988,10 +983,9 @@ |
988 | 983 | if (p->accessType == cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE)) |
989 | 984 | map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE; |
990 | 985 | |
991 | - udf_debug("Partition (%d type %x) starts at physical %d, " | |
992 | - "block length %d\n", p_index, | |
993 | - map->s_partition_type, map->s_partition_root, | |
994 | - map->s_partition_len); | |
986 | + udf_debug("Partition (%d type %x) starts at physical %d, block length %d\n", | |
987 | + p_index, map->s_partition_type, | |
988 | + map->s_partition_root, map->s_partition_len); | |
995 | 989 | |
996 | 990 | if (strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02) && |
997 | 991 | strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR03)) |
998 | 992 | |
... | ... | @@ -1008,12 +1002,12 @@ |
1008 | 1002 | map->s_uspace.s_table = udf_iget(sb, &loc); |
1009 | 1003 | if (!map->s_uspace.s_table) { |
1010 | 1004 | udf_debug("cannot load unallocSpaceTable (part %d)\n", |
1011 | - p_index); | |
1005 | + p_index); | |
1012 | 1006 | return 1; |
1013 | 1007 | } |
1014 | 1008 | map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_TABLE; |
1015 | 1009 | udf_debug("unallocSpaceTable (part %d) @ %ld\n", |
1016 | - p_index, map->s_uspace.s_table->i_ino); | |
1010 | + p_index, map->s_uspace.s_table->i_ino); | |
1017 | 1011 | } |
1018 | 1012 | |
1019 | 1013 | if (phd->unallocSpaceBitmap.extLength) { |
... | ... | @@ -1026,8 +1020,8 @@ |
1026 | 1020 | bitmap->s_extPosition = le32_to_cpu( |
1027 | 1021 | phd->unallocSpaceBitmap.extPosition); |
1028 | 1022 | map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_BITMAP; |
1029 | - udf_debug("unallocSpaceBitmap (part %d) @ %d\n", p_index, | |
1030 | - bitmap->s_extPosition); | |
1023 | + udf_debug("unallocSpaceBitmap (part %d) @ %d\n", | |
1024 | + p_index, bitmap->s_extPosition); | |
1031 | 1025 | } |
1032 | 1026 | |
1033 | 1027 | if (phd->partitionIntegrityTable.extLength) |
1034 | 1028 | |
... | ... | @@ -1043,13 +1037,13 @@ |
1043 | 1037 | map->s_fspace.s_table = udf_iget(sb, &loc); |
1044 | 1038 | if (!map->s_fspace.s_table) { |
1045 | 1039 | udf_debug("cannot load freedSpaceTable (part %d)\n", |
1046 | - p_index); | |
1040 | + p_index); | |
1047 | 1041 | return 1; |
1048 | 1042 | } |
1049 | 1043 | |
1050 | 1044 | map->s_partition_flags |= UDF_PART_FLAG_FREED_TABLE; |
1051 | 1045 | udf_debug("freedSpaceTable (part %d) @ %ld\n", |
1052 | - p_index, map->s_fspace.s_table->i_ino); | |
1046 | + p_index, map->s_fspace.s_table->i_ino); | |
1053 | 1047 | } |
1054 | 1048 | |
1055 | 1049 | if (phd->freedSpaceBitmap.extLength) { |
... | ... | @@ -1062,8 +1056,8 @@ |
1062 | 1056 | bitmap->s_extPosition = le32_to_cpu( |
1063 | 1057 | phd->freedSpaceBitmap.extPosition); |
1064 | 1058 | map->s_partition_flags |= UDF_PART_FLAG_FREED_BITMAP; |
1065 | - udf_debug("freedSpaceBitmap (part %d) @ %d\n", p_index, | |
1066 | - bitmap->s_extPosition); | |
1059 | + udf_debug("freedSpaceBitmap (part %d) @ %d\n", | |
1060 | + p_index, bitmap->s_extPosition); | |
1067 | 1061 | } |
1068 | 1062 | return 0; |
1069 | 1063 | } |
... | ... | @@ -1325,9 +1319,8 @@ |
1325 | 1319 | struct metadataPartitionMap *mdm = |
1326 | 1320 | (struct metadataPartitionMap *) |
1327 | 1321 | &(lvd->partitionMaps[offset]); |
1328 | - udf_debug("Parsing Logical vol part %d " | |
1329 | - "type %d id=%s\n", i, type, | |
1330 | - UDF_ID_METADATA); | |
1322 | + udf_debug("Parsing Logical vol part %d type %d id=%s\n", | |
1323 | + i, type, UDF_ID_METADATA); | |
1331 | 1324 | |
1332 | 1325 | map->s_partition_type = UDF_METADATA_MAP25; |
1333 | 1326 | map->s_partition_func = udf_get_pblock_meta25; |
1334 | 1327 | |
1335 | 1328 | |
1336 | 1329 | |
1337 | 1330 | |
1338 | 1331 | |
1339 | 1332 | |
... | ... | @@ -1346,21 +1339,20 @@ |
1346 | 1339 | mdm->flags & 0x01; |
1347 | 1340 | |
1348 | 1341 | udf_debug("Metadata Ident suffix=0x%x\n", |
1349 | - (le16_to_cpu( | |
1350 | - ((__le16 *) | |
1351 | - mdm->partIdent.identSuffix)[0]))); | |
1342 | + le16_to_cpu(*(__le16 *) | |
1343 | + mdm->partIdent.identSuffix)); | |
1352 | 1344 | udf_debug("Metadata part num=%d\n", |
1353 | - le16_to_cpu(mdm->partitionNum)); | |
1345 | + le16_to_cpu(mdm->partitionNum)); | |
1354 | 1346 | udf_debug("Metadata part alloc unit size=%d\n", |
1355 | - le32_to_cpu(mdm->allocUnitSize)); | |
1347 | + le32_to_cpu(mdm->allocUnitSize)); | |
1356 | 1348 | udf_debug("Metadata file loc=%d\n", |
1357 | - le32_to_cpu(mdm->metadataFileLoc)); | |
1349 | + le32_to_cpu(mdm->metadataFileLoc)); | |
1358 | 1350 | udf_debug("Mirror file loc=%d\n", |
1359 | - le32_to_cpu(mdm->metadataMirrorFileLoc)); | |
1351 | + le32_to_cpu(mdm->metadataMirrorFileLoc)); | |
1360 | 1352 | udf_debug("Bitmap file loc=%d\n", |
1361 | - le32_to_cpu(mdm->metadataBitmapFileLoc)); | |
1353 | + le32_to_cpu(mdm->metadataBitmapFileLoc)); | |
1362 | 1354 | udf_debug("Duplicate Flag: %d %d\n", |
1363 | - mdata->s_dup_md_flag, mdm->flags); | |
1355 | + mdata->s_dup_md_flag, mdm->flags); | |
1364 | 1356 | } else { |
1365 | 1357 | udf_debug("Unknown ident: %s\n", |
1366 | 1358 | upm2->partIdent.ident); |
1367 | 1359 | |
... | ... | @@ -1370,16 +1362,15 @@ |
1370 | 1362 | map->s_partition_num = le16_to_cpu(upm2->partitionNum); |
1371 | 1363 | } |
1372 | 1364 | udf_debug("Partition (%d:%d) type %d on volume %d\n", |
1373 | - i, map->s_partition_num, type, | |
1374 | - map->s_volumeseqnum); | |
1365 | + i, map->s_partition_num, type, map->s_volumeseqnum); | |
1375 | 1366 | } |
1376 | 1367 | |
1377 | 1368 | if (fileset) { |
1378 | 1369 | struct long_ad *la = (struct long_ad *)&(lvd->logicalVolContentsUse[0]); |
1379 | 1370 | |
1380 | 1371 | *fileset = lelb_to_cpu(la->extLocation); |
1381 | - udf_debug("FileSet found in LogicalVolDesc at block=%d, " | |
1382 | - "partition=%d\n", fileset->logicalBlockNum, | |
1372 | + udf_debug("FileSet found in LogicalVolDesc at block=%d, partition=%d\n", | |
1373 | + fileset->logicalBlockNum, | |
1383 | 1374 | fileset->partitionReferenceNum); |
1384 | 1375 | } |
1385 | 1376 | if (lvd->integritySeqExt.extLength) |
... | ... | @@ -1734,8 +1725,7 @@ |
1734 | 1725 | return 0; |
1735 | 1726 | } |
1736 | 1727 | if (nsr_off == -1) |
1737 | - udf_debug("Failed to read byte 32768. Assuming open " | |
1738 | - "disc. Skipping validity check\n"); | |
1728 | + udf_debug("Failed to read byte 32768. Assuming open disc. Skipping validity check\n"); | |
1739 | 1729 | if (!sbi->s_last_block) |
1740 | 1730 | sbi->s_last_block = udf_get_last_block(sb); |
1741 | 1731 | } else { |