* [PATCH][next] udf: remove redundant variable netype
@ 2023-01-05 13:49 Colin Ian King
2023-01-06 16:17 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-01-05 13:49 UTC (permalink / raw)
To: Jan Kara; +Cc: kernel-janitors, linux-kernel
The variable netype is assigned a value that is never read, the assignment
is redundant the variable can be removed.
Cleans up clang scan-build warning:
fs/exfat/dir.c:1012:5: warning: Value stored to 'step' is never read
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/udf/truncate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c
index 036ebd892b85..775edaba82ee 100644
--- a/fs/udf/truncate.c
+++ b/fs/udf/truncate.c
@@ -125,7 +125,7 @@ void udf_discard_prealloc(struct inode *inode)
struct kernel_lb_addr eloc;
uint32_t elen;
uint64_t lbcount = 0;
- int8_t etype = -1, netype;
+ int8_t etype = -1;
struct udf_inode_info *iinfo = UDF_I(inode);
int bsize = 1 << inode->i_blkbits;
@@ -136,7 +136,7 @@ void udf_discard_prealloc(struct inode *inode)
epos.block = iinfo->i_location;
/* Find the last extent in the file */
- while ((netype = udf_next_aext(inode, &epos, &eloc, &elen, 0)) != -1) {
+ while (udf_next_aext(inode, &epos, &eloc, &elen, 0) != -1) {
brelse(prev_epos.bh);
prev_epos = epos;
if (prev_epos.bh)
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] udf: remove redundant variable netype
2023-01-05 13:49 [PATCH][next] udf: remove redundant variable netype Colin Ian King
@ 2023-01-06 16:17 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2023-01-06 16:17 UTC (permalink / raw)
To: Colin Ian King; +Cc: Jan Kara, kernel-janitors, linux-kernel
On Thu 05-01-23 13:49:25, Colin Ian King wrote:
> The variable netype is assigned a value that is never read, the assignment
> is redundant the variable can be removed.
>
> Cleans up clang scan-build warning:
> fs/exfat/dir.c:1012:5: warning: Value stored to 'step' is never read
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Thanks, I've added the patch to my tree. Just the warning message mentioned
in the changelog is apparently from somewhere else so I've just deleted it
;).
Honza
> ---
> fs/udf/truncate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c
> index 036ebd892b85..775edaba82ee 100644
> --- a/fs/udf/truncate.c
> +++ b/fs/udf/truncate.c
> @@ -125,7 +125,7 @@ void udf_discard_prealloc(struct inode *inode)
> struct kernel_lb_addr eloc;
> uint32_t elen;
> uint64_t lbcount = 0;
> - int8_t etype = -1, netype;
> + int8_t etype = -1;
> struct udf_inode_info *iinfo = UDF_I(inode);
> int bsize = 1 << inode->i_blkbits;
>
> @@ -136,7 +136,7 @@ void udf_discard_prealloc(struct inode *inode)
> epos.block = iinfo->i_location;
>
> /* Find the last extent in the file */
> - while ((netype = udf_next_aext(inode, &epos, &eloc, &elen, 0)) != -1) {
> + while (udf_next_aext(inode, &epos, &eloc, &elen, 0) != -1) {
> brelse(prev_epos.bh);
> prev_epos = epos;
> if (prev_epos.bh)
> --
> 2.30.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-06 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 13:49 [PATCH][next] udf: remove redundant variable netype Colin Ian King
2023-01-06 16:17 ` 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).