From: "Darrick J. Wong" <djwong@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: linux-xfs@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] xfs: remove redundant pointer lip
Date: Mon, 10 Oct 2022 10:57:10 -0700 [thread overview]
Message-ID: <Y0Rc9ulPUJb77up6@magnolia> (raw)
In-Reply-To: <20221010160515.3199641-1-colin.i.king@gmail.com>
On Mon, Oct 10, 2022 at 05:05:15PM +0100, Colin Ian King wrote:
> The assignment to pointer lip is not really required, the pointer lip
> is redundant and can be removed.
>
> Cleans up clang-scan warning:
> warning: Although the value stored to 'lip' is used in the enclosing
> expression, the value is never actually read from 'lip'
> [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Looks good!
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
>
> V2: Keep != NULL comparison for stylistic reasons, as suggested by
> Darrick J. Wong
> ---
> fs/xfs/xfs_trans_ail.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index 16fbf2a1144c..87db72758d1f 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
> @@ -730,11 +730,10 @@ void
> xfs_ail_push_all_sync(
> struct xfs_ail *ailp)
> {
> - struct xfs_log_item *lip;
> DEFINE_WAIT(wait);
>
> spin_lock(&ailp->ail_lock);
> - while ((lip = xfs_ail_max(ailp)) != NULL) {
> + while (xfs_ail_max(ailp) != NULL) {
> prepare_to_wait(&ailp->ail_empty, &wait, TASK_UNINTERRUPTIBLE);
> wake_up_process(ailp->ail_task);
> spin_unlock(&ailp->ail_lock);
> --
> 2.37.3
>
prev parent reply other threads:[~2022-10-10 17:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 16:05 [PATCH][V2] xfs: remove redundant pointer lip Colin Ian King
2022-10-10 17:57 ` Darrick J. Wong [this message]
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=Y0Rc9ulPUJb77up6@magnolia \
--to=djwong@kernel.org \
--cc=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).