+ fs-reiserfs-journalc-remove-set-but-not-used-variables.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/reiserfs/journal.c: remove set but not used variables
has been added to the -mm tree.  Its filename is
     fs-reiserfs-journalc-remove-set-but-not-used-variables.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fs-reiserfs-journalc-remove-set-but-not-used-variables.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fs-reiserfs-journalc-remove-set-but-not-used-variables.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: zhengbin <zhengbin13@xxxxxxxxxx>
Subject: fs/reiserfs/journal.c: remove set but not used variables

Fixes gcc '-Wunused-but-set-variable' warning:

fs/reiserfs/journal.c: In function flush_older_commits:
fs/reiserfs/journal.c:894:15: warning: variable first_trans_id set but not used [-Wunused-but-set-variable]
fs/reiserfs/journal.c: In function flush_journal_list:
fs/reiserfs/journal.c:1354:38: warning: variable last set but not used [-Wunused-but-set-variable]
fs/reiserfs/journal.c: In function do_journal_release:
fs/reiserfs/journal.c:1916:6: warning: variable flushed set but not used [-Wunused-but-set-variable]
fs/reiserfs/journal.c: In function do_journal_end:
fs/reiserfs/journal.c:3993:6: warning: variable old_start set but not used [-Wunused-but-set-variable]

Link: http://lkml.kernel.org/r/1566379929-118398-2-git-send-email-zhengbin13@xxxxxxxxxx
Signed-off-by: zhengbin <zhengbin13@xxxxxxxxxx>
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/reiserfs/journal.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

--- a/fs/reiserfs/journal.c~fs-reiserfs-journalc-remove-set-but-not-used-variables
+++ a/fs/reiserfs/journal.c
@@ -891,7 +891,6 @@ static int flush_older_commits(struct su
 	struct list_head *entry;
 	unsigned int trans_id = jl->j_trans_id;
 	unsigned int other_trans_id;
-	unsigned int first_trans_id;
 
 find_first:
 	/*
@@ -914,8 +913,6 @@ find_first:
 		return 0;
 	}
 
-	first_trans_id = first_jl->j_trans_id;
-
 	entry = &first_jl->j_list;
 	while (1) {
 		other_jl = JOURNAL_LIST_ENTRY(entry);
@@ -1351,7 +1348,7 @@ static int flush_journal_list(struct sup
 			      struct reiserfs_journal_list *jl, int flushall)
 {
 	struct reiserfs_journal_list *pjl;
-	struct reiserfs_journal_cnode *cn, *last;
+	struct reiserfs_journal_cnode *cn;
 	int count;
 	int was_jwait = 0;
 	int was_dirty = 0;
@@ -1509,7 +1506,6 @@ static int flush_journal_list(struct sup
 					 b_blocknr, __func__);
 		}
 free_cnode:
-		last = cn;
 		cn = cn->next;
 		if (saved_bh) {
 			/*
@@ -1911,7 +1907,6 @@ static int do_journal_release(struct rei
 			      struct super_block *sb, int error)
 {
 	struct reiserfs_transaction_handle myth;
-	int flushed = 0;
 	struct reiserfs_journal *journal = SB_JOURNAL(sb);
 
 	/*
@@ -1933,7 +1928,6 @@ static int do_journal_release(struct rei
 						     1);
 			journal_mark_dirty(&myth, SB_BUFFER_WITH_SB(sb));
 			do_journal_end(&myth, FLUSH_ALL);
-			flushed = 1;
 		}
 	}
 
@@ -3987,7 +3981,6 @@ static int do_journal_end(struct reiserf
 	struct buffer_head *c_bh;	/* commit bh */
 	struct buffer_head *d_bh;	/* desc bh */
 	int cur_write_start = 0;	/* start index of current log write */
-	int old_start;
 	int i;
 	int flush;
 	int wait_on_commit;
@@ -4244,7 +4237,6 @@ static int do_journal_end(struct reiserf
 	journal->j_num_work_lists++;
 
 	/* reset journal values for the next transaction */
-	old_start = journal->j_start;
 	journal->j_start =
 	    (journal->j_start + journal->j_len +
 	     2) % SB_ONDISK_JOURNAL_SIZE(sb);
_

Patches currently in -mm which might be from zhengbin13@xxxxxxxxxx are

fs-ocfs2-nameic-remove-set-but-not-used-variables.patch
fs-ocfs2-filec-remove-set-but-not-used-variables.patch
fs-ocfs2-dirc-remove-set-but-not-used-variables.patch
fs-reiserfs-journalc-remove-set-but-not-used-variables.patch
fs-reiserfs-streec-remove-set-but-not-used-variables.patch
fs-reiserfs-lbalancec-remove-set-but-not-used-variables.patch
fs-reiserfs-objectidc-remove-set-but-not-used-variables.patch
fs-reiserfs-printsc-remove-set-but-not-used-variables.patch
fs-reiserfs-fix_nodec-remove-set-but-not-used-variables.patch
fs-reiserfs-do_balanc-remove-set-but-not-used-variables.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux