Skip to contentSkip to conversation

epoll: remove unneeded variable in reverse_path_check()

PATCH In review Dan Carpenter 2 participants 2 messages Feb 24, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 epoll: remove unneeded variable in reverse_path_check()

We never use the length variable.

fs/eventpoll.c +0 -2
index c636fc8..997a6d2 100644
@@ -1042,13 +1042,11 @@ static int reverse_path_check_proc(void *priv, void *cookie, int call_nests)
  */
 static int reverse_path_check(void)
 {
-	int length = 0;
 	int error = 0;
 	struct file *current_file;
 
 	/* let's call this for all tfiles */
 	list_for_each_entry(current_file, &tfile_check_list, f_tfile_llink) {
-		length++;
 		path_count_init();
 		error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
 					reverse_path_check_proc, current_file,
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Dan Carpenter

We never use the length variable.

fs/eventpoll.c +0 -0
index c636fc8..997a6d2 100644
@@ -1042,13 +1042,11 @@ static int reverse_path_check_proc(void *priv, void *cookie, int call_nests)
  */
 static int reverse_path_check(void)
 {

fs/eventpoll.c static int reverse_path_check_proc(void *priv, void *cookie, int call_nests) · line 1052

Quoted 10 lines
fs/eventpoll.c +0 -2
-	int length = 0;
 	int error = 0;
 	struct file *current_file;
 
 	/* let's call this for all tfiles */
 	list_for_each_entry(current_file, &tfile_check_list, f_tfile_llink) {
-		length++;
 		path_count_init();
 		error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
 					reverse_path_check_proc, current_file,

Yes, I had that in there while testing, and should have removed it.

Thanks,

-Jason