[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230330132114.1826399-1-trix@redhat.com>
Date: Thu, 30 Mar 2023 09:21:14 -0400
From: Tom Rix <trix@...hat.com>
To: ccaulfie@...hat.com, teigland@...hat.com, nathan@...nel.org,
ndesaulniers@...gle.com
Cc: cluster-devel@...hat.com, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, Tom Rix <trix@...hat.com>
Subject: [PATCH] fs: dlm: remove unused count_match variable
clang with W=1 reports
fs/dlm/dir.c:67:26: error: variable
'count_match' set but not used [-Werror,-Wunused-but-set-variable]
unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
^
This variable is not used so remove it.
Signed-off-by: Tom Rix <trix@...hat.com>
---
fs/dlm/dir.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c
index fb1981654bb2..982f7a5570fe 100644
--- a/fs/dlm/dir.c
+++ b/fs/dlm/dir.c
@@ -64,7 +64,7 @@ int dlm_recover_directory(struct dlm_ls *ls)
char *b, *last_name = NULL;
int error = -ENOMEM, last_len, nodeid, result;
uint16_t namelen;
- unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
+ unsigned int count = 0, count_bad = 0, count_add = 0;
log_rinfo(ls, "dlm_recover_directory");
@@ -158,14 +158,6 @@ int dlm_recover_directory(struct dlm_ls *ls)
b, namelen);
}
- /* The name was found in rsbtbl, and the
- * master nodeid matches memb->nodeid. */
-
- if (result == DLM_LU_MATCH &&
- nodeid == memb->nodeid) {
- count_match++;
- }
-
/* The name was not found in rsbtbl and was
* added with memb->nodeid as the master. */
--
2.27.0
Powered by blists - more mailing lists