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] [day] [month] [year] [list]
Date:   Tue, 10 Nov 2020 00:49:45 +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>,
        Alex Shi <alex.shi@...ux.alibaba.com>
Subject: Re: [PATCH] fs/ntfs: remove unused varibles

Hi,

Andrew, please can you merge this?  Thanks a lot in advance!

Alex, thank you for the patch!

Best regards,

	Anton

> On 8 Nov 2020, at 07:38, Alex Shi <alex.shi@...ux.alibaba.com> wrote:
> 
> We actually don't use these varibles, so remove them to avoid gcc warning:
> fs/ntfs/file.c:326:14: warning: variable ‘base_ni’ set but not used
> [-Wunused-but-set-variable]
> fs/ntfs/logfile.c:481:21: warning: variable ‘log_page_mask’ set but not
> used [-Wunused-but-set-variable]
> 
> Signed-off-by: Alex Shi <alex.shi@...ux.alibaba.com>
> Acked-by: Anton Altaparmakov <anton@...era.com> 
> Cc: linux-ntfs-dev@...ts.sourceforge.net 
> Cc: linux-kernel@...r.kernel.org 
> ---
> fs/ntfs/file.c    | 5 +----
> fs/ntfs/logfile.c | 3 +--
> 2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
> index f42967b738eb..e5aab265dff1 100644
> --- a/fs/ntfs/file.c
> +++ b/fs/ntfs/file.c
> @@ -323,7 +323,7 @@ static ssize_t ntfs_prepare_file_for_write(struct kiocb *iocb,
> 	unsigned long flags;
> 	struct file *file = iocb->ki_filp;
> 	struct inode *vi = file_inode(file);
> -	ntfs_inode *base_ni, *ni = NTFS_I(vi);
> +	ntfs_inode *ni = NTFS_I(vi);
> 	ntfs_volume *vol = ni->vol;
> 
> 	ntfs_debug("Entering for i_ino 0x%lx, attribute type 0x%x, pos "
> @@ -365,9 +365,6 @@ static ssize_t ntfs_prepare_file_for_write(struct kiocb *iocb,
> 		err = -EOPNOTSUPP;
> 		goto out;
> 	}
> -	base_ni = ni;
> -	if (NInoAttr(ni))
> -		base_ni = ni->ext.base_ntfs_ino;
> 	err = file_remove_privs(file);
> 	if (unlikely(err))
> 		goto out;
> diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c
> index a0c40f1be7ac..bc1bf217b38e 100644
> --- a/fs/ntfs/logfile.c
> +++ b/fs/ntfs/logfile.c
> @@ -478,7 +478,7 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp)
> 	u8 *kaddr = NULL;
> 	RESTART_PAGE_HEADER *rstr1_ph = NULL;
> 	RESTART_PAGE_HEADER *rstr2_ph = NULL;
> -	int log_page_size, log_page_mask, err;
> +	int log_page_size, err;
> 	bool logfile_is_empty = true;
> 	u8 log_page_bits;
> 
> @@ -501,7 +501,6 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp)
> 		log_page_size = DefaultLogPageSize;
> 	else
> 		log_page_size = PAGE_SIZE;
> -	log_page_mask = log_page_size - 1;
> 	/*
> 	 * Use ntfs_ffs() instead of ffs() to enable the compiler to
> 	 * optimize log_page_size and log_page_bits into constants.
> -- 
> 1.8.3.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