Skip to contentSkip to conversation

udf: remove reporting loc in debug output

PATCH In review Tom Rix 4 participants 4 messages Jan 27, 2023 – Feb 7, 2023 UDF filesystem

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 udf: remove reporting loc in debug output

clang build fails with
fs/udf/partition.c:86:28: error: variable 'loc' is uninitialized when used here [-Werror,-Wuninitialized]

                          sb, block, partition, loc, index);
                                                ^~~

loc is now only know when bh is valid. So remove reporting loc in debug output.

Fixes 4215db46d538 ("udf: Use udf_bread() in udf_get_pblock_virt15()")
---
 fs/udf/partition.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/udf/partition.c +2 -2
index 92765d2f6958..5bcfe78d5cab 100644
@@ -82,8 +82,8 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
 
 	bh = udf_bread(sbi->s_vat_inode, newblock, 0, &err);
 	if (!bh) {
-		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u) VAT: %u[%u]\n",
-			  sb, block, partition, loc, index);
+		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u)\n",
+			  sb, block, partition);
 		return 0xFFFFFFFF;
 	}
 
Signature · 1 line
2.26.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Tom Rix

clang build fails with
fs/udf/partition.c:86:28: error: variable 'loc' is uninitialized when used here [-Werror,-Wuninitialized]

                          sb, block, partition, loc, index);
                                                ^~~

loc is now only know when bh is valid. So remove reporting loc in debug output.

Fixes 4215db46d538 ("udf: Use udf_bread() in udf_get_pblock_virt15()")
Quoted 22 lines
---
 fs/udf/partition.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/udf/partition.c +2 -2
index 92765d2f6958..5bcfe78d5cab 100644
@@ -82,8 +82,8 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
 
 	bh = udf_bread(sbi->s_vat_inode, newblock, 0, &err);
 	if (!bh) {
-		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u) VAT: %u[%u]\n",
-			  sb, block, partition, loc, index);
+		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u)\n",
+			  sb, block, partition);
 		return 0xFFFFFFFF;
 	}
 
Signature · 1 line
2.26.3
Reviewed-by on v1 1/1
#2 lore raw
In reply to Tom Rix
Quoted 6 lines · Tom Rix

clang build fails with
fs/udf/partition.c:86:28: error: variable 'loc' is uninitialized when used here [-Werror,-Wuninitialized]

                          sb, block, partition, loc, index);
                                                ^~~

loc is now only know when bh is valid. So remove reporting loc in debug output.

typo: s/know/known/

Quoted 3 lines
Fixes 4215db46d538 ("udf: Use udf_bread() in udf_get_pblock_virt15()")

Thanks Tom, kernelci has also been reporting this.
https://lore.kernel.org/linux-next/?q=error%3A+variable+%27loc%27+is+uninitialized+when+used+here

Quoted 23 lines
---
 fs/udf/partition.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/udf/partition.c +2 -2
index 92765d2f6958..5bcfe78d5cab 100644
@@ -82,8 +82,8 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
 
 	bh = udf_bread(sbi->s_vat_inode, newblock, 0, &err);
 	if (!bh) {
-		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u) VAT: %u[%u]\n",
-			  sb, block, partition, loc, index);
+		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u)\n",
+			  sb, block, partition);
 		return 0xFFFFFFFF;
 	}
 
Signature · 1 line
2.26.3
#3 lore raw
In reply to Tom Rix
Quoted 9 lines · Tom Rix

clang build fails with
fs/udf/partition.c:86:28: error: variable 'loc' is uninitialized when used here [-Werror,-Wuninitialized]

                          sb, block, partition, loc, index);
                                                ^~~

loc is now only know when bh is valid. So remove reporting loc in debug output.

Fixes 4215db46d538 ("udf: Use udf_bread() in udf_get_pblock_virt15()")

Thanks! Patch applied!

Honza

Quoted 22 lines
---
 fs/udf/partition.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/udf/partition.c +2 -2
index 92765d2f6958..5bcfe78d5cab 100644
@@ -82,8 +82,8 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
 
 	bh = udf_bread(sbi->s_vat_inode, newblock, 0, &err);
 	if (!bh) {
-		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u) VAT: %u[%u]\n",
-			  sb, block, partition, loc, index);
+		udf_debug("get_pblock(UDF_VIRTUAL_MAP:%p,%u,%u)\n",
+			  sb, block, partition);
 		return 0xFFFFFFFF;
 	}
 
Signature · 1 line
2.26.3
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR