* [PATCH] reiserfs: remove unused sched_count variable
@ 2023-03-26 20:44 Tom Rix
2023-03-27 8:57 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-26 20:44 UTC (permalink / raw)
To: nathan, ndesaulniers, willy, akpm, jack, jlayton, song, yi.zhang,
bvanassche
Cc: reiserfs-devel, linux-kernel, llvm, 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.
Signed-off-by: Tom Rix <trix@redhat.com>
---
fs/reiserfs/journal.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 9ce4ec296b74..4d11d60f493c 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -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;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] reiserfs: remove unused sched_count variable
2023-03-26 20:44 [PATCH] reiserfs: remove unused sched_count variable Tom Rix
@ 2023-03-27 8:57 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2023-03-27 8:57 UTC (permalink / raw)
To: Tom Rix
Cc: nathan, ndesaulniers, willy, akpm, jack, jlayton, song, yi.zhang,
bvanassche, reiserfs-devel, linux-kernel, llvm
On Sun 26-03-23 16:44:59, Tom Rix wrote:
> 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.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Thanks. I've added the fix to my tree.
Honza
> ---
> fs/reiserfs/journal.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
> index 9ce4ec296b74..4d11d60f493c 100644
> --- a/fs/reiserfs/journal.c
> +++ b/fs/reiserfs/journal.c
> @@ -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;
> }
> --
> 2.27.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-27 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 20:44 [PATCH] reiserfs: remove unused sched_count variable Tom Rix
2023-03-27 8:57 ` Jan Kara
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).