linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: Fix not used variable 'index'
@ 2024-10-23  9:48 Zeng Heng via Linux-f2fs-devel
  2024-10-24 10:27 ` Chao Yu via Linux-f2fs-devel
  2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
  0 siblings, 2 replies; 3+ messages in thread
From: Zeng Heng via Linux-f2fs-devel @ 2024-10-23  9:48 UTC (permalink / raw)
  To: chao, jaegeuk; +Cc: bobo.shaobowang, linux-kernel, linux-f2fs-devel

Fix the following compilation warning:
fs/f2fs/data.c:2391:10: warning: variable ‘index’ set but not used
[-Wunused-but-set-variable]
 2391 |  pgoff_t index;

Only define and set the variable index when the CONFIG_F2FS_FS_COMPRESSION
is enabled.

Fixes: db92e6c729d8 ("f2fs: convert f2fs_mpage_readpages() to use folio")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
 fs/f2fs/data.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 94f7b084f601..9202082a3902 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2385,10 +2385,10 @@ static int f2fs_mpage_readpages(struct inode *inode,
 		.nr_cpages = 0,
 	};
 	pgoff_t nc_cluster_idx = NULL_CLUSTER;
+	pgoff_t index;
 #endif
 	unsigned nr_pages = rac ? readahead_count(rac) : 1;
 	unsigned max_nr_pages = nr_pages;
-	pgoff_t index;
 	int ret = 0;
 
 	map.m_pblk = 0;
@@ -2406,9 +2406,9 @@ static int f2fs_mpage_readpages(struct inode *inode,
 			prefetchw(&folio->flags);
 		}
 
+#ifdef CONFIG_F2FS_FS_COMPRESSION
 		index = folio_index(folio);
 
-#ifdef CONFIG_F2FS_FS_COMPRESSION
 		if (!f2fs_compressed_file(inode))
 			goto read_single_page;
 
-- 
2.25.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: Fix not used variable 'index'
  2024-10-23  9:48 [f2fs-dev] [PATCH] f2fs: Fix not used variable 'index' Zeng Heng via Linux-f2fs-devel
@ 2024-10-24 10:27 ` Chao Yu via Linux-f2fs-devel
  2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
  1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2024-10-24 10:27 UTC (permalink / raw)
  To: Zeng Heng, jaegeuk; +Cc: bobo.shaobowang, linux-kernel, linux-f2fs-devel

On 2024/10/23 17:48, Zeng Heng wrote:
> Fix the following compilation warning:
> fs/f2fs/data.c:2391:10: warning: variable ‘index’ set but not used
> [-Wunused-but-set-variable]
>   2391 |  pgoff_t index;
> 
> Only define and set the variable index when the CONFIG_F2FS_FS_COMPRESSION
> is enabled.
> 
> Fixes: db92e6c729d8 ("f2fs: convert f2fs_mpage_readpages() to use folio")
> Signed-off-by: Zeng Heng <zengheng4@huawei.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: Fix not used variable 'index'
  2024-10-23  9:48 [f2fs-dev] [PATCH] f2fs: Fix not used variable 'index' Zeng Heng via Linux-f2fs-devel
  2024-10-24 10:27 ` Chao Yu via Linux-f2fs-devel
@ 2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs--- via Linux-f2fs-devel @ 2024-11-07 20:30 UTC (permalink / raw)
  To: Zeng Heng; +Cc: jaegeuk, linux-f2fs-devel, linux-kernel, bobo.shaobowang

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed, 23 Oct 2024 17:48:50 +0800 you wrote:
> Fix the following compilation warning:
> fs/f2fs/data.c:2391:10: warning: variable ‘index’ set but not used
> [-Wunused-but-set-variable]
>  2391 |  pgoff_t index;
> 
> Only define and set the variable index when the CONFIG_F2FS_FS_COMPRESSION
> is enabled.
> 
> [...]

Here is the summary with links:
  - [f2fs-dev] f2fs: Fix not used variable 'index'
    https://git.kernel.org/jaegeuk/f2fs/c/0c3a38a4b442

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-07 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-23  9:48 [f2fs-dev] [PATCH] f2fs: Fix not used variable 'index' Zeng Heng via Linux-f2fs-devel
2024-10-24 10:27 ` Chao Yu via Linux-f2fs-devel
2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel

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).