From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: zhoumin <teczm@foxmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfat:remove unused variable
Date: Tue, 19 Aug 2025 02:12:44 +0900 [thread overview]
Message-ID: <878qjg7dv7.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <tencent_9DE7CC9367096503F6ADD2BD960079267406@qq.com>
zhoumin <teczm@foxmail.com> writes:
> Remove unused variable definition and related function definition
> and redundant variable assignments within functions.
>
> Signed-off-by: zhoumin <teczm@foxmail.com>
Looks good. Thanks.
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> ---
> fs/fat/dir.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index acbec5bdd521..92b091783966 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -1209,7 +1209,7 @@ EXPORT_SYMBOL_GPL(fat_alloc_new_dir);
>
> static int fat_add_new_entries(struct inode *dir, void *slots, int nr_slots,
> int *nr_cluster, struct msdos_dir_entry **de,
> - struct buffer_head **bh, loff_t *i_pos)
> + struct buffer_head **bh)
> {
> struct super_block *sb = dir->i_sb;
> struct msdos_sb_info *sbi = MSDOS_SB(sb);
> @@ -1269,7 +1269,6 @@ static int fat_add_new_entries(struct inode *dir, void *slots, int nr_slots,
> get_bh(bhs[n]);
> *bh = bhs[n];
> *de = (struct msdos_dir_entry *)((*bh)->b_data + offset);
> - *i_pos = fat_make_i_pos(sb, *bh, *de);
>
> /* Second stage: clear the rest of cluster, and write outs */
> err = fat_zeroed_cluster(dir, start_blknr, ++n, bhs, MAX_BUF_PER_PAGE);
> @@ -1298,7 +1297,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
> struct buffer_head *bh, *prev, *bhs[3]; /* 32*slots (672bytes) */
> struct msdos_dir_entry *de;
> int err, free_slots, i, nr_bhs;
> - loff_t pos, i_pos;
> + loff_t pos;
>
> sinfo->nr_slots = nr_slots;
>
> @@ -1386,7 +1385,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
> * add the cluster to dir.
> */
> cluster = fat_add_new_entries(dir, slots, nr_slots, &nr_cluster,
> - &de, &bh, &i_pos);
> + &de, &bh);
> if (cluster < 0) {
> err = cluster;
> goto error_remove;
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
prev parent reply other threads:[~2025-08-18 17:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 14:44 zhoumin
2025-08-18 17:12 ` OGAWA Hirofumi [this message]
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=878qjg7dv7.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=teczm@foxmail.com \
/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
all inboxes | Powered by JetHome®