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:   Tue, 7 Dec 2021 11:18:44 +0100
From:   David Hildenbrand <david@...hat.com>
To:     cgel.zte@...il.com, akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        chiminghao <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cm>
Subject: Re: [PATCH] mm:remove unneeded variable

On 07.12.21 09:32, cgel.zte@...il.com wrote:
> From: chiminghao <chi.minghao@....com.cn>
> 
> return value form directly instead of
> taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@....com.cm>
> Signed-off-by: chiminghao <chi.minghao@....com.cn>
> ---
>  mm/truncate.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/mm/truncate.c b/mm/truncate.c
> index cc83a3f7c1ad..41b8249b3b4a 100644
> --- a/mm/truncate.c
> +++ b/mm/truncate.c
> @@ -205,7 +205,6 @@ static void truncate_cleanup_page(struct page *page)
>  static int
>  invalidate_complete_page(struct address_space *mapping, struct page *page)
>  {
> -	int ret;
>  
>  	if (page->mapping != mapping)
>  		return 0;
> @@ -213,9 +212,7 @@ invalidate_complete_page(struct address_space *mapping, struct page *page)
>  	if (page_has_private(page) && !try_to_release_page(page, 0))
>  		return 0;
>  
> -	ret = remove_mapping(mapping, page);
> -
> -	return ret;
> +	return remove_mapping(mapping, page);
>  }
>  
>  int truncate_inode_page(struct address_space *mapping, struct page *page)
> 

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ