linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Colin King <colin.king@canonical.com>
Cc: linux-xfs@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: remove redundant re-initialization of total_nr_pages
Date: Mon, 18 Sep 2017 13:38:30 -0700	[thread overview]
Message-ID: <20170918203830.GV6540@magnolia> (raw)
In-Reply-To: <20170918120157.30134-1-colin.king@canonical.com>

On Mon, Sep 18, 2017 at 01:01:57PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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: Darrick J. Wong <darrick.wong@oracle.com>

> ---
>  fs/xfs/xfs_buf.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index da14658da310..2f97c12ca75e 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -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;
> -- 
> 2.14.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2017-09-18 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 12:01 [PATCH] xfs: remove redundant re-initialization of total_nr_pages Colin King
2017-09-18 12:44 ` Brian Foster
2017-09-18 20:38 ` Darrick J. Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918203830.GV6540@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).