From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
akpm <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
ocfs2-devel@oss.oracle.com
Subject: Re: [PATCH 3/3] ocfs2: use the bitmap API to simplify code
Date: Wed, 20 Jul 2022 10:06:15 +0800 [thread overview]
Message-ID: <e6c41a71-7649-a182-bdcd-678803efd6cb@linux.alibaba.com> (raw)
In-Reply-To: <0a0d6e9bf9d10f67b7a0c1cdd6176cdd0ad2e1f6.1658224839.git.christophe.jaillet@wanadoo.fr>
On 7/19/22 6:05 PM, Christophe JAILLET wrote:
> Use bitmap_zero() instead of hand-writing it.
> It is less verbose.
>
> While at it, add an explicit #include <linux/bitmap.h>.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/heartbeat.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c
> index 4863ad35c242..e243cd99e63f 100644
> --- a/fs/ocfs2/heartbeat.c
> +++ b/fs/ocfs2/heartbeat.c
> @@ -8,6 +8,7 @@
> * Copyright (C) 2002, 2004 Oracle. All rights reserved.
> */
>
> +#include <linux/bitmap.h>
> #include <linux/fs.h>
> #include <linux/types.h>
> #include <linux/highmem.h>
> @@ -29,8 +30,7 @@
> static void ocfs2_node_map_init(struct ocfs2_node_map *map)
> {
> map->num_nodes = OCFS2_NODE_MAP_MAX_NODES;
> - memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) *
> - sizeof(unsigned long));
> + bitmap_zero(map->map, OCFS2_NODE_MAP_MAX_NODES);
> }
>
> void ocfs2_init_node_maps(struct ocfs2_super *osb)
next prev parent reply other threads:[~2022-07-20 2:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 10:01 [PATCH 1/3] ocfs2: Remove some useless functions Christophe JAILLET
2022-07-19 10:01 ` [PATCH 2/3] ocfs2: Remove a useless spinlock Christophe JAILLET
2022-07-19 10:24 ` David Laight
2022-07-19 13:25 ` Christophe JAILLET
2022-07-19 14:19 ` David Laight
2022-07-20 1:59 ` Joseph Qi
2022-07-20 8:26 ` Marion & Christophe JAILLET
2022-07-20 9:48 ` Joseph Qi
2022-07-20 13:32 ` Christophe JAILLET
2022-07-21 1:53 ` Joseph Qi
2022-07-19 10:05 ` [PATCH 3/3] ocfs2: use the bitmap API to simplify code Christophe JAILLET
2022-07-20 2:06 ` Joseph Qi [this message]
2022-07-20 2:03 ` [PATCH 1/3] ocfs2: Remove some useless functions Joseph Qi
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=e6c41a71-7649-a182-bdcd-678803efd6cb@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jlbec@evilplan.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@oss.oracle.com \
/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®