* [PATCH -next] mm/fs: remove variable bdi set but not used
@ 2022-02-03 5:26 Yang Li
2022-02-03 8:06 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2022-02-03 5:26 UTC (permalink / raw)
To: jack; +Cc: linux-ext4, linux-kernel, Yang Li, Abaci Robot
The code that uses the pointer 'bdi' has been removed in commit:
'37c32ade079f000c8e539730f254b14fae0d3b49' and inode_to_bdi() doesn't
change 'inode', so the declaration and assignment of 'bdi' can be removed.
Eliminate the following clang warning:
fs/ext2/ialloc.c:173:27: warning: variable 'bdi' set but not used
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
fs/ext2/ialloc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index d632764da240..998dd2ac8008 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -170,9 +170,6 @@ static void ext2_preread_inode(struct inode *inode)
unsigned long offset;
unsigned long block;
struct ext2_group_desc * gdp;
- struct backing_dev_info *bdi;
-
- bdi = inode_to_bdi(inode);
block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb);
gdp = ext2_get_group_desc(inode->i_sb, block_group, NULL);
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] mm/fs: remove variable bdi set but not used
2022-02-03 5:26 [PATCH -next] mm/fs: remove variable bdi set but not used Yang Li
@ 2022-02-03 8:06 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2022-02-03 8:06 UTC (permalink / raw)
To: Yang Li; +Cc: jack, linux-ext4, linux-kernel, Abaci Robot
On Thu 03-02-22 13:26:33, Yang Li wrote:
> The code that uses the pointer 'bdi' has been removed in commit:
> '37c32ade079f000c8e539730f254b14fae0d3b49' and inode_to_bdi() doesn't
> change 'inode', so the declaration and assignment of 'bdi' can be removed.
>
> Eliminate the following clang warning:
> fs/ext2/ialloc.c:173:27: warning: variable 'bdi' set but not used
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Thanks! The patch looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext2/ialloc.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
> index d632764da240..998dd2ac8008 100644
> --- a/fs/ext2/ialloc.c
> +++ b/fs/ext2/ialloc.c
> @@ -170,9 +170,6 @@ static void ext2_preread_inode(struct inode *inode)
> unsigned long offset;
> unsigned long block;
> struct ext2_group_desc * gdp;
> - struct backing_dev_info *bdi;
> -
> - bdi = inode_to_bdi(inode);
>
> block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb);
> gdp = ext2_get_group_desc(inode->i_sb, block_group, NULL);
> --
> 2.20.1.7.g153144c
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-03 8:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03 5:26 [PATCH -next] mm/fs: remove variable bdi set but not used Yang Li
2022-02-03 8:06 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox