Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joe Perches and committed by
Jan Kara
a983f368 c2bff36c

+50 -59
+8 -6
fs/udf/balloc.c
··· 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 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 ··· 156 155 if (udf_set_bit(bit + i, bh->b_data)) { 157 156 udf_debug("bit %ld already set\n", bit + i); 158 157 udf_debug("byte=%2x\n", 159 - ((char *)bh->b_data)[(bit + i) >> 3]); 158 + ((char *)bh->b_data)[(bit + i) >> 3]); 160 159 } 161 160 } 162 161 udf_add_free_space(sb, sbi->s_partition, count); ··· 370 369 if (bloc->logicalBlockNum + count < count || 371 370 (bloc->logicalBlockNum + count) > partmap->s_partition_len) { 372 371 udf_debug("%d < %d || %d + %d > %d\n", 373 - bloc->logicalBlockNum, 0, bloc->logicalBlockNum, count, 372 + bloc->logicalBlockNum, 0, 373 + bloc->logicalBlockNum, count, 374 374 partmap->s_partition_len); 375 375 goto error_return; 376 376 }
+2 -2
fs/udf/directory.c
··· 162 162 int padlen; 163 163 164 164 if ((!buffer) || (!offset)) { 165 - udf_debug("invalidparms\n, buffer=%p, offset=%p\n", buffer, 166 - offset); 165 + udf_debug("invalidparms, buffer=%p, offset=%p\n", 166 + buffer, offset); 167 167 return NULL; 168 168 } 169 169
+1 -2
fs/udf/inode.c
··· 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
+1 -1
fs/udf/lowlevel.c
··· 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 {
+4 -4
fs/udf/partition.c
··· 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 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
+34 -44
fs/udf/super.c
··· 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", ··· 799 803 pvoldesc->recordingDateAndTime)) { 800 804 #ifdef UDFFS_DEBUG 801 805 struct timestamp *ts = &pvoldesc->recordingDateAndTime; 802 - udf_debug("recording time %04u/%02u/%02u" 803 - " %02u:%02u (%x)\n", 806 + udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n", 804 807 le16_to_cpu(ts->year), ts->month, ts->day, ts->hour, 805 808 ts->minute, le16_to_cpu(ts->typeAndTimezone)); 806 809 #endif ··· 810 815 strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name, 811 816 outstr->u_len > 31 ? 31 : outstr->u_len); 812 817 udf_debug("volIdent[] = '%s'\n", 813 - UDF_SB(sb)->s_volume_ident); 818 + UDF_SB(sb)->s_volume_ident); 814 819 } 815 820 816 821 if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) ··· 842 847 addr.partitionReferenceNum = map->s_partition_num; 843 848 844 849 udf_debug("Metadata file location: block = %d part = %d\n", 845 - addr.logicalBlockNum, addr.partitionReferenceNum); 850 + addr.logicalBlockNum, addr.partitionReferenceNum); 846 851 847 852 mdata->s_metadata_fe = udf_iget(sb, &addr); 848 853 ··· 862 867 addr.partitionReferenceNum = map->s_partition_num; 863 868 864 869 udf_debug("Mirror metadata file location: block = %d part = %d\n", 865 - addr.logicalBlockNum, addr.partitionReferenceNum); 870 + addr.logicalBlockNum, addr.partitionReferenceNum); 866 871 867 872 mdata->s_mirror_fe = udf_iget(sb, &addr); 868 873 ··· 891 896 addr.partitionReferenceNum = map->s_partition_num; 892 897 893 898 udf_debug("Bitmap file location: block = %d part = %d\n", 894 - addr.logicalBlockNum, addr.partitionReferenceNum); 899 + addr.logicalBlockNum, addr.partitionReferenceNum); 895 900 896 901 mdata->s_bitmap_fe = udf_iget(sb, &addr); 897 902 ··· 983 988 if (p->accessType == cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE)) 984 989 map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE; 985 990 986 - udf_debug("Partition (%d type %x) starts at physical %d, " 987 - "block length %d\n", p_index, 988 - map->s_partition_type, map->s_partition_root, 989 - map->s_partition_len); 991 + udf_debug("Partition (%d type %x) starts at physical %d, block length %d\n", 992 + p_index, map->s_partition_type, 993 + map->s_partition_root, map->s_partition_len); 990 994 991 995 if (strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02) && 992 996 strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR03)) ··· 1002 1008 map->s_uspace.s_table = udf_iget(sb, &loc); 1003 1009 if (!map->s_uspace.s_table) { 1004 1010 udf_debug("cannot load unallocSpaceTable (part %d)\n", 1005 - p_index); 1011 + p_index); 1006 1012 return 1; 1007 1013 } 1008 1014 map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_TABLE; 1009 1015 udf_debug("unallocSpaceTable (part %d) @ %ld\n", 1010 - p_index, map->s_uspace.s_table->i_ino); 1016 + p_index, map->s_uspace.s_table->i_ino); 1011 1017 } 1012 1018 1013 1019 if (phd->unallocSpaceBitmap.extLength) { ··· 1020 1026 bitmap->s_extPosition = le32_to_cpu( 1021 1027 phd->unallocSpaceBitmap.extPosition); 1022 1028 map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_BITMAP; 1023 - udf_debug("unallocSpaceBitmap (part %d) @ %d\n", p_index, 1024 - bitmap->s_extPosition); 1029 + udf_debug("unallocSpaceBitmap (part %d) @ %d\n", 1030 + p_index, bitmap->s_extPosition); 1025 1031 } 1026 1032 1027 1033 if (phd->partitionIntegrityTable.extLength) ··· 1037 1043 map->s_fspace.s_table = udf_iget(sb, &loc); 1038 1044 if (!map->s_fspace.s_table) { 1039 1045 udf_debug("cannot load freedSpaceTable (part %d)\n", 1040 - p_index); 1046 + p_index); 1041 1047 return 1; 1042 1048 } 1043 1049 1044 1050 map->s_partition_flags |= UDF_PART_FLAG_FREED_TABLE; 1045 1051 udf_debug("freedSpaceTable (part %d) @ %ld\n", 1046 - p_index, map->s_fspace.s_table->i_ino); 1052 + p_index, map->s_fspace.s_table->i_ino); 1047 1053 } 1048 1054 1049 1055 if (phd->freedSpaceBitmap.extLength) { ··· 1056 1062 bitmap->s_extPosition = le32_to_cpu( 1057 1063 phd->freedSpaceBitmap.extPosition); 1058 1064 map->s_partition_flags |= UDF_PART_FLAG_FREED_BITMAP; 1059 - udf_debug("freedSpaceBitmap (part %d) @ %d\n", p_index, 1060 - bitmap->s_extPosition); 1065 + udf_debug("freedSpaceBitmap (part %d) @ %d\n", 1066 + p_index, bitmap->s_extPosition); 1061 1067 } 1062 1068 return 0; 1063 1069 } ··· 1319 1325 struct metadataPartitionMap *mdm = 1320 1326 (struct metadataPartitionMap *) 1321 1327 &(lvd->partitionMaps[offset]); 1322 - udf_debug("Parsing Logical vol part %d " 1323 - "type %d id=%s\n", i, type, 1324 - UDF_ID_METADATA); 1328 + udf_debug("Parsing Logical vol part %d type %d id=%s\n", 1329 + i, type, UDF_ID_METADATA); 1325 1330 1326 1331 map->s_partition_type = UDF_METADATA_MAP25; 1327 1332 map->s_partition_func = udf_get_pblock_meta25; ··· 1339 1346 mdm->flags & 0x01; 1340 1347 1341 1348 udf_debug("Metadata Ident suffix=0x%x\n", 1342 - (le16_to_cpu( 1343 - ((__le16 *) 1344 - mdm->partIdent.identSuffix)[0]))); 1349 + le16_to_cpu(*(__le16 *) 1350 + mdm->partIdent.identSuffix)); 1345 1351 udf_debug("Metadata part num=%d\n", 1346 - le16_to_cpu(mdm->partitionNum)); 1352 + le16_to_cpu(mdm->partitionNum)); 1347 1353 udf_debug("Metadata part alloc unit size=%d\n", 1348 - le32_to_cpu(mdm->allocUnitSize)); 1354 + le32_to_cpu(mdm->allocUnitSize)); 1349 1355 udf_debug("Metadata file loc=%d\n", 1350 - le32_to_cpu(mdm->metadataFileLoc)); 1356 + le32_to_cpu(mdm->metadataFileLoc)); 1351 1357 udf_debug("Mirror file loc=%d\n", 1352 - le32_to_cpu(mdm->metadataMirrorFileLoc)); 1358 + le32_to_cpu(mdm->metadataMirrorFileLoc)); 1353 1359 udf_debug("Bitmap file loc=%d\n", 1354 - le32_to_cpu(mdm->metadataBitmapFileLoc)); 1360 + le32_to_cpu(mdm->metadataBitmapFileLoc)); 1355 1361 udf_debug("Duplicate Flag: %d %d\n", 1356 - mdata->s_dup_md_flag, mdm->flags); 1362 + mdata->s_dup_md_flag, mdm->flags); 1357 1363 } else { 1358 1364 udf_debug("Unknown ident: %s\n", 1359 1365 upm2->partIdent.ident); ··· 1362 1370 map->s_partition_num = le16_to_cpu(upm2->partitionNum); 1363 1371 } 1364 1372 udf_debug("Partition (%d:%d) type %d on volume %d\n", 1365 - i, map->s_partition_num, type, 1366 - map->s_volumeseqnum); 1373 + i, map->s_partition_num, type, map->s_volumeseqnum); 1367 1374 } 1368 1375 1369 1376 if (fileset) { 1370 1377 struct long_ad *la = (struct long_ad *)&(lvd->logicalVolContentsUse[0]); 1371 1378 1372 1379 *fileset = lelb_to_cpu(la->extLocation); 1373 - udf_debug("FileSet found in LogicalVolDesc at block=%d, " 1374 - "partition=%d\n", fileset->logicalBlockNum, 1380 + udf_debug("FileSet found in LogicalVolDesc at block=%d, partition=%d\n", 1381 + fileset->logicalBlockNum, 1375 1382 fileset->partitionReferenceNum); 1376 1383 } 1377 1384 if (lvd->integritySeqExt.extLength) ··· 1725 1734 return 0; 1726 1735 } 1727 1736 if (nsr_off == -1) 1728 - udf_debug("Failed to read byte 32768. Assuming open " 1729 - "disc. Skipping validity check\n"); 1737 + udf_debug("Failed to read byte 32768. Assuming open disc. Skipping validity check\n"); 1730 1738 if (!sbi->s_last_block) 1731 1739 sbi->s_last_block = udf_get_last_block(sb); 1732 1740 } else {