linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: remove redundant re-initialization of total_nr_pages
@ 2017-09-18 12:01 Colin King
  2017-09-18 12:44 ` Brian Foster
  2017-09-18 20:38 ` Darrick J. Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-09-18 12:01 UTC (permalink / raw)
  To: Darrick J . Wong, linux-xfs; +Cc: kernel-janitors, linux-kernel

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>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: remove redundant re-initialization of total_nr_pages
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Foster @ 2017-09-18 12:44 UTC (permalink / raw)
  To: Colin King; +Cc: Darrick J . Wong, linux-xfs, kernel-janitors, linux-kernel

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: Brian Foster <bfoster@redhat.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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: remove redundant re-initialization of total_nr_pages
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2017-09-18 20:38 UTC (permalink / raw)
  To: Colin King; +Cc: linux-xfs, kernel-janitors, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-18 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).