Skip to content

Commit

Permalink
xfs: remove redundant re-initialization of total_nr_pages
Browse files Browse the repository at this point in the history
Variable total_nr_pages is being initialized and then updated with
the same value, this latter assignment is redundant and can be
removed.  Cleans up clang build warning:

Value stored to 'total_nr_pages' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  • Loading branch information
Colin Ian King authored and Darrick J. Wong committed Sep 26, 2017
1 parent 1e6fa68 commit 60915f8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,8 +1258,6 @@ xfs_buf_ioapply_map(
int size;
int offset;

total_nr_pages = bp->b_page_count;

/* skip the pages in the buffer before the start offset */
page_index = 0;
offset = *buf_offset;
Expand Down

0 comments on commit 60915f8

Please sign in to comment.