linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Wang Long <wanglong19@meituan.com>
Cc: jack@suse.cz, tj@kernel.org, akpm@linux-foundation.org,
	gregkh@linuxfoundation.org, axboe@fb.com, nborisov@suse.com,
	hannes@cmpxchg.org, vdavydov.dev@gmail.com, jlayton@redhat.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2] writeback: remove the unused function parameter
Date: Mon, 6 Nov 2017 13:52:26 +0100	[thread overview]
Message-ID: <20171106125226.GA4359@quack2.suse.cz> (raw)
In-Reply-To: <1509685485-15278-1-git-send-email-wanglong19@meituan.com>

On Fri 03-11-17 01:04:45, Wang Long wrote:
> The parameter `struct bdi_writeback *wb` is not been used in the function
> body. so we just remove it.
> 
> Signed-off-by: Wang Long <wanglong19@meituan.com>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  include/linux/backing-dev.h | 2 +-
>  mm/page-writeback.c         | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
> index 1662157..186a2e7 100644
> --- a/include/linux/backing-dev.h
> +++ b/include/linux/backing-dev.h
> @@ -95,7 +95,7 @@ static inline s64 wb_stat_sum(struct bdi_writeback *wb, enum wb_stat_item item)
>  /*
>   * maximal error of a stat counter.
>   */
> -static inline unsigned long wb_stat_error(struct bdi_writeback *wb)
> +static inline unsigned long wb_stat_error(void)
>  {
>  #ifdef CONFIG_SMP
>  	return nr_cpu_ids * WB_STAT_BATCH;
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 0b9c5cb..9287466 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -1543,7 +1543,7 @@ static inline void wb_dirty_limits(struct dirty_throttle_control *dtc)
>  	 * actually dirty; with m+n sitting in the percpu
>  	 * deltas.
>  	 */
> -	if (dtc->wb_thresh < 2 * wb_stat_error(wb)) {
> +	if (dtc->wb_thresh < 2 * wb_stat_error()) {
>  		wb_reclaimable = wb_stat_sum(wb, WB_RECLAIMABLE);
>  		dtc->wb_dirty = wb_reclaimable + wb_stat_sum(wb, WB_WRITEBACK);
>  	} else {
> @@ -1802,7 +1802,7 @@ static void balance_dirty_pages(struct address_space *mapping,
>  		 * more page. However wb_dirty has accounting errors.  So use
>  		 * the larger and more IO friendly wb_stat_error.
>  		 */
> -		if (sdtc->wb_dirty <= wb_stat_error(wb))
> +		if (sdtc->wb_dirty <= wb_stat_error())
>  			break;
>  
>  		if (fatal_signal_pending(current))
> -- 
> 1.8.3.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-11-06 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03  5:04 [PATCH v2] writeback: remove the unused function parameter Wang Long
2017-11-06 12:52 ` Jan Kara [this message]
2017-11-06 14:56 ` Tejun Heo

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=20171106125226.GA4359@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nborisov@suse.com \
    --cc=tj@kernel.org \
    --cc=vdavydov.dev@gmail.com \
    --cc=wanglong19@meituan.com \
    /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).