[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250825133604.337407-1-liaoyuanhong@vivo.com>
Date: Mon, 25 Aug 2025 21:36:01 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>,
Joseph Qi <joseph.qi@...ux.alibaba.com>,
ocfs2-devel@...ts.linux.dev (open list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2)),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] ocfs2: Remove unnecessary parentheses
When using &, it's unnecessary to have parentheses afterward. Remove
redundant parentheses to enhance readability.
Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
---
fs/ocfs2/dlm/dlmdomain.c | 12 ++++++------
fs/ocfs2/quota_local.c | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
index 2018501b2249..3729533db9a5 100644
--- a/fs/ocfs2/dlm/dlmdomain.c
+++ b/fs/ocfs2/dlm/dlmdomain.c
@@ -1160,7 +1160,7 @@ static int dlm_match_nodes(struct dlm_ctxt *dlm, struct dlm_query_nodeinfo *qn)
for (j = 0; j < qn->qn_numnodes; ++j)
mlog(0, "Node %3d, %pI4:%u\n", qn->qn_nodes[j].ni_nodenum,
- &(qn->qn_nodes[j].ni_ipv4_address),
+ &qn->qn_nodes[j].ni_ipv4_address,
ntohs(qn->qn_nodes[j].ni_ipv4_port));
for (i = 0; i < O2NM_MAX_NODES && !status; ++i) {
@@ -1191,14 +1191,14 @@ static int dlm_match_nodes(struct dlm_ctxt *dlm, struct dlm_query_nodeinfo *qn)
"registered in joining node %d but not in "
"local node %d\n", qn->qn_domain,
remote->ni_nodenum,
- &(remote->ni_ipv4_address),
+ &remote->ni_ipv4_address,
ntohs(remote->ni_ipv4_port),
qn->qn_nodenum, dlm->node_num);
if (local && !remote)
mlog(ML_ERROR, "Domain %s: Node %d (%pI4:%u) "
"registered in local node %d but not in "
"joining node %d\n", qn->qn_domain,
- local->nd_num, &(local->nd_ipv4_address),
+ local->nd_num, &local->nd_ipv4_address,
ntohs(local->nd_ipv4_port),
dlm->node_num, qn->qn_nodenum);
BUG_ON((!local && !remote));
@@ -1235,7 +1235,7 @@ static int dlm_send_nodeinfo(struct dlm_ctxt *dlm, unsigned long *node_map)
qn->qn_nodes[count].ni_ipv4_port = node->nd_ipv4_port;
qn->qn_nodes[count].ni_ipv4_address = node->nd_ipv4_address;
mlog(0, "Node %3d, %pI4:%u\n", node->nd_num,
- &(node->nd_ipv4_address), ntohs(node->nd_ipv4_port));
+ &node->nd_ipv4_address, ntohs(node->nd_ipv4_port));
++count;
o2nm_node_put(node);
}
@@ -2001,8 +2001,8 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain,
INIT_LIST_HEAD(&dlm->pending_asts);
INIT_LIST_HEAD(&dlm->pending_basts);
- mlog(0, "dlm->recovery_map=%p, &(dlm->recovery_map[0])=%p\n",
- dlm->recovery_map, &(dlm->recovery_map[0]));
+ mlog(0, "dlm->recovery_map=%p, &dlm->recovery_map[0]=%p\n",
+ dlm->recovery_map, &dlm->recovery_map[0]);
bitmap_zero(dlm->recovery_map, O2NM_MAX_NODES);
bitmap_zero(dlm->live_nodes_map, O2NM_MAX_NODES);
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index de7f12858729..675c1eafc732 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -330,7 +330,7 @@ void ocfs2_free_quota_recovery(struct ocfs2_quota_recovery *rec)
int type;
for (type = 0; type < OCFS2_MAXQUOTAS; type++)
- free_recovery_list(&(rec->r_list[type]));
+ free_recovery_list(&rec->r_list[type]);
kfree(rec);
}
@@ -376,7 +376,7 @@ static struct ocfs2_quota_recovery *ocfs2_alloc_quota_recovery(void)
if (!rec)
return NULL;
for (type = 0; type < OCFS2_MAXQUOTAS; type++)
- INIT_LIST_HEAD(&(rec->r_list[type]));
+ INIT_LIST_HEAD(&rec->r_list[type]);
return rec;
}
@@ -473,7 +473,7 @@ static int ocfs2_recover_local_quota_file(struct inode *lqinode,
trace_ocfs2_recover_local_quota_file((unsigned long)lqinode->i_ino, type);
- list_for_each_entry_safe(rchunk, next, &(rec->r_list[type]), rc_list) {
+ list_for_each_entry_safe(rchunk, next, &rec->r_list[type], rc_list) {
chunk = rchunk->rc_chunk;
hbh = NULL;
status = ocfs2_read_quota_block(lqinode,
@@ -574,7 +574,7 @@ static int ocfs2_recover_local_quota_file(struct inode *lqinode,
break;
}
if (status < 0)
- free_recovery_list(&(rec->r_list[type]));
+ free_recovery_list(&rec->r_list[type]);
if (status)
mlog_errno(status);
return status;
@@ -599,7 +599,7 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
"slot %u\n", osb->dev_str, slot_num);
for (type = 0; type < OCFS2_MAXQUOTAS; type++) {
- if (list_empty(&(rec->r_list[type])))
+ if (list_empty(&rec->r_list[type]))
continue;
trace_ocfs2_finish_quota_recovery(slot_num);
lqinode = ocfs2_get_system_file_inode(osb, ino[type], slot_num);
--
2.34.1
Powered by blists - more mailing lists