* [PATCH] udf: remove reporting loc in debug output
@ 2023-01-27 16:29 Tom Rix
2023-01-27 17:53 ` Nathan Chancellor
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tom Rix @ 2023-01-27 16:29 UTC (permalink / raw)
To: jack, nathan, ndesaulniers; +Cc: linux-kernel, llvm, 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()")
Signed-off-by: Tom Rix <trix@redhat.com>
---
fs/udf/partition.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/udf/partition.c b/fs/udf/partition.c
index 92765d2f6958..5bcfe78d5cab 100644
--- a/fs/udf/partition.c
+++ b/fs/udf/partition.c
@@ -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;
}
--
2.26.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] udf: remove reporting loc in debug output
2023-01-27 16:29 [PATCH] udf: remove reporting loc in debug output Tom Rix
@ 2023-01-27 17:53 ` Nathan Chancellor
2023-02-01 23:14 ` Nick Desaulniers
2023-02-07 11:01 ` Jan Kara
2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2023-01-27 17:53 UTC (permalink / raw)
To: Tom Rix; +Cc: jack, ndesaulniers, linux-kernel, llvm
On Fri, Jan 27, 2023 at 08:29:06AM -0800, Tom Rix wrote:
> 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()")
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> fs/udf/partition.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/udf/partition.c b/fs/udf/partition.c
> index 92765d2f6958..5bcfe78d5cab 100644
> --- a/fs/udf/partition.c
> +++ b/fs/udf/partition.c
> @@ -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;
> }
>
> --
> 2.26.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udf: remove reporting loc in debug output
2023-01-27 16:29 [PATCH] udf: remove reporting loc in debug output Tom Rix
2023-01-27 17:53 ` Nathan Chancellor
@ 2023-02-01 23:14 ` Nick Desaulniers
2023-02-07 11:01 ` Jan Kara
2 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2023-02-01 23:14 UTC (permalink / raw)
To: Tom Rix; +Cc: jack, nathan, linux-kernel, llvm
On Fri, Jan 27, 2023 at 08:29:06AM -0800, Tom Rix wrote:
> 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/
>
> Fixes: 4215db46d538 ("udf: Use udf_bread() in udf_get_pblock_virt15()")
> Signed-off-by: Tom Rix <trix@redhat.com>
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
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> fs/udf/partition.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/udf/partition.c b/fs/udf/partition.c
> index 92765d2f6958..5bcfe78d5cab 100644
> --- a/fs/udf/partition.c
> +++ b/fs/udf/partition.c
> @@ -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;
> }
>
> --
> 2.26.3
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udf: remove reporting loc in debug output
2023-01-27 16:29 [PATCH] udf: remove reporting loc in debug output Tom Rix
2023-01-27 17:53 ` Nathan Chancellor
2023-02-01 23:14 ` Nick Desaulniers
@ 2023-02-07 11:01 ` Jan Kara
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2023-02-07 11:01 UTC (permalink / raw)
To: Tom Rix; +Cc: jack, nathan, ndesaulniers, linux-kernel, llvm
On Fri 27-01-23 08:29:06, Tom Rix wrote:
> 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()")
> Signed-off-by: Tom Rix <trix@redhat.com>
Thanks! Patch applied!
Honza
> ---
> fs/udf/partition.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/udf/partition.c b/fs/udf/partition.c
> index 92765d2f6958..5bcfe78d5cab 100644
> --- a/fs/udf/partition.c
> +++ b/fs/udf/partition.c
> @@ -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;
> }
>
> --
> 2.26.3
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-07 11:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 16:29 [PATCH] udf: remove reporting loc in debug output Tom Rix
2023-01-27 17:53 ` Nathan Chancellor
2023-02-01 23:14 ` Nick Desaulniers
2023-02-07 11:01 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).