mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zheng Zengkai <zhengzengkai@huawei.com>
To: <anton@tuxera.com>
Cc: <linux-ntfs-dev@lists.sourceforge.net>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] fs/ntfs: fix set but not used variable 'log_page_mask'
Date: Sat, 28 Nov 2020 09:29:27 +0800	[thread overview]
Message-ID: <3f52b53a-d7b4-7246-c1f6-7f57cc1c311f@huawei.com> (raw)
In-Reply-To: <20200312041353.19877-1-zhengzengkai@huawei.com>

Ping...
> 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@huawei.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.

  reply	other threads:[~2020-11-28  1:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12  4:13 Zheng Zengkai
2020-11-28  1:29 ` Zheng Zengkai [this message]
2020-12-08  8:24 ` Anton Altaparmakov
2020-12-10  2:36   ` Andrew Morton
2020-12-10  2:51     ` Anton Altaparmakov
2020-12-10  6:17       ` Zheng Zengkai

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=3f52b53a-d7b4-7246-c1f6-7f57cc1c311f@huawei.com \
    --to=zhengzengkai@huawei.com \
    --cc=anton@tuxera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®