public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] btrfs: remove unused variable pages_processed
@ 2023-05-30 14:21 Tom Rix
  2023-06-01 18:29 ` Nathan Chancellor
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-05-30 14:21 UTC (permalink / raw)
  To: clm, josef, dsterba, nathan, ndesaulniers
  Cc: linux-btrfs, linux-kernel, llvm, Tom Rix

clang with W=1 reports
fs/btrfs/extent_io.c:230:16: error: variable
  'pages_processed' set but not used [-Werror,-Wunused-but-set-variable]
        unsigned long pages_processed = 0;
                      ^
This variable is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 fs/btrfs/extent_io.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 89e093ae1c33..6919409c1183 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -227,7 +227,6 @@ static void __process_pages_contig(struct address_space *mapping,
 	pgoff_t start_index = start >> PAGE_SHIFT;
 	pgoff_t end_index = end >> PAGE_SHIFT;
 	pgoff_t index = start_index;
-	unsigned long pages_processed = 0;
 	struct folio_batch fbatch;
 	int i;
 
@@ -242,7 +241,6 @@ static void __process_pages_contig(struct address_space *mapping,
 
 			process_one_page(fs_info, &folio->page, locked_page,
 					 page_ops, start, end);
-			pages_processed += folio_nr_pages(folio);
 		}
 		folio_batch_release(&fbatch);
 		cond_resched();
-- 
2.27.0


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

end of thread, other threads:[~2023-06-01 18:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30 14:21 [PATCH] btrfs: remove unused variable pages_processed Tom Rix
2023-06-01 18:29 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox