Skip to contentSkip to conversation

reiserfs: remove unused sched_count variable

PATCH In review Tom Rix 2 participants 2 messages Mar 26, 2023 – Mar 27, 2023

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 reiserfs: remove unused sched_count variable

clang with W=1 reports
fs/reiserfs/journal.c:3034:6: error: variable
'sched_count' set but not used [-Werror,-Wunused-but-set-variable]

        int sched_count = 0;
            ^

This variable is not used so remove it.

---
 fs/reiserfs/journal.c | 2 --
 1 file changed, 2 deletions(-)
fs/reiserfs/journal.c +0 -2
index 9ce4ec296b74..4d11d60f493c 100644
@@ -3031,7 +3031,6 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
 	unsigned int old_trans_id;
 	struct reiserfs_journal *journal = SB_JOURNAL(sb);
 	struct reiserfs_transaction_handle myth;
-	int sched_count = 0;
 	int retval;
 	int depth;
 
@@ -3088,7 +3087,6 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
 		    ((journal->j_len + nblocks + 2) * 100) <
 		    (journal->j_len_alloc * 75)) {
 			if (atomic_read(&journal->j_wcount) > 10) {
-				sched_count++;
 				queue_log_writer(sb);
 				goto relock;
 			}
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Tom Rix

clang with W=1 reports
fs/reiserfs/journal.c:3034:6: error: variable
'sched_count' set but not used [-Werror,-Wunused-but-set-variable]

        int sched_count = 0;
            ^

This variable is not used so remove it.

Thanks. I've added the fix to my tree.

Honza

Quoted 27 lines
---
 fs/reiserfs/journal.c | 2 --
 1 file changed, 2 deletions(-)
fs/reiserfs/journal.c +0 -2
index 9ce4ec296b74..4d11d60f493c 100644
@@ -3031,7 +3031,6 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
 	unsigned int old_trans_id;
 	struct reiserfs_journal *journal = SB_JOURNAL(sb);
 	struct reiserfs_transaction_handle myth;
-	int sched_count = 0;
 	int retval;
 	int depth;
 
@@ -3088,7 +3087,6 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
 		    ((journal->j_len + nblocks + 2) * 100) <
 		    (journal->j_len_alloc * 75)) {
 			if (atomic_read(&journal->j_wcount) > 10) {
-				sched_count++;
 				queue_log_writer(sb);
 				goto relock;
 			}
Signature · 1 line
2.27.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR