lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Nov 2017 13:52:26 +0100
From:   Jan Kara <jack@...e.cz>
To:     Wang Long <wanglong19@...tuan.com>
Cc:     jack@...e.cz, tj@...nel.org, akpm@...ux-foundation.org,
        gregkh@...uxfoundation.org, axboe@...com, nborisov@...e.com,
        hannes@...xchg.org, vdavydov.dev@...il.com, jlayton@...hat.com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v2] writeback: remove the unused function parameter

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@...tuan.com>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@...e.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@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ