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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <94ED375C-C57C-464B-A1CA-BFB1EEF71BB2@tuxera.com>
Date:   Tue, 8 Dec 2020 08:24:02 +0000
From:   Anton Altaparmakov <anton@...era.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     "linux-ntfs-dev@...ts.sourceforge.net" 
        <linux-ntfs-dev@...ts.sourceforge.net>,
        LKML <linux-kernel@...r.kernel.org>,
        Zheng Zengkai <zhengzengkai@...wei.com>
Subject: Re: [PATCH -next] fs/ntfs: fix set but not used variable
 'log_page_mask'

Hi Andrew,

Can you please apply this?

Thanks a lot in advance!

Hi Zheng,

Thank you for the patch!

Best regards,

	Anton

> On 12 Mar 2020, at 04:13, Zheng Zengkai <zhengzengkai@...wei.com> wrote:
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> fs/ntfs/logfile.c: In function ntfs_check_logfile:
> fs/ntfs/logfile.c:481:21:
> warning: variable log_page_mask set but not used [-Wunused-but-set-variable]
> 
> Actually log_page_mask can be used to replace 'log_page_size - 1' as it is set.
> 
> Signed-off-by: Zheng Zengkai <zhengzengkai@...wei.com>
> Acked-by: Anton Altaparmakov <anton@...era.com>
> ---
> fs/ntfs/logfile.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c
> index a0c40f1be7ac..c35fcf389369 100644
> --- a/fs/ntfs/logfile.c
> +++ b/fs/ntfs/logfile.c
> @@ -507,7 +507,7 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp)
> 	 * optimize log_page_size and log_page_bits into constants.
> 	 */
> 	log_page_bits = ntfs_ffs(log_page_size) - 1;
> -	size &= ~(s64)(log_page_size - 1);
> +	size &= ~(s64)(log_page_mask);
> 	/*
> 	 * Ensure the log file is big enough to store at least the two restart
> 	 * pages and the minimum number of log record pages.
> -- 
> 2.20.1
> 


-- 
Anton Altaparmakov <anton at tuxera.com> (replace at with @)
Lead in File System Development, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ