From: "Darrick J. Wong" <djwong@kernel.org>
To: Hongbo Li <lihongbo22@huawei.com>
Cc: chandan.babu@oracle.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH -next] xfs: use LIST_HEAD() to simplify code
Date: Wed, 21 Aug 2024 09:21:10 -0700 [thread overview]
Message-ID: <20240821162110.GD865349@frogsfrogsfrogs> (raw)
In-Reply-To: <20240821064355.2293091-1-lihongbo22@huawei.com>
On Wed, Aug 21, 2024 at 02:43:55PM +0800, Hongbo Li wrote:
> list_head can be initialized automatically with LIST_HEAD()
> instead of calling INIT_LIST_HEAD().
>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_mru_cache.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c
> index 7443debaffd6..d0f5b403bdbe 100644
> --- a/fs/xfs/xfs_mru_cache.c
> +++ b/fs/xfs/xfs_mru_cache.c
> @@ -230,9 +230,8 @@ _xfs_mru_cache_clear_reap_list(
> __releases(mru->lock) __acquires(mru->lock)
> {
> struct xfs_mru_cache_elem *elem, *next;
> - struct list_head tmp;
> + LIST_HEAD(tmp);
>
> - INIT_LIST_HEAD(&tmp);
> list_for_each_entry_safe(elem, next, &mru->reap_list, list_node) {
>
> /* Remove the element from the data store. */
> --
> 2.34.1
>
>
prev parent reply other threads:[~2024-08-21 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 6:43 [PATCH -next] xfs: use LIST_HEAD() to simplify code Hongbo Li
2024-08-21 16:21 ` 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=20240821162110.GD865349@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=chandan.babu@oracle.com \
--cc=lihongbo22@huawei.com \
--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