public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yang Li <yang.lee@linux.alibaba.com>
To: jack@suse.com
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yang Li <yang.lee@linux.alibaba.com>,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH -next] mm/fs: remove variable bdi set but not used
Date: Thu,  3 Feb 2022 13:26:33 +0800	[thread overview]
Message-ID: <20220203052633.54000-1-yang.lee@linux.alibaba.com> (raw)

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


             reply	other threads:[~2022-02-03  5:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  5:26 Yang Li [this message]
2022-02-03  8:06 ` [PATCH -next] mm/fs: remove variable bdi set but not used Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220203052633.54000-1-yang.lee@linux.alibaba.com \
    --to=yang.lee@linux.alibaba.com \
    --cc=abaci@linux.alibaba.com \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox