From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: sched-ext@lists.linux.dev, Tejun Heo <tj@kernel.org>,
David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>
Cc: Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
Chia-Ping Tsai <chia7712@gmail.com>,
chengyang.chou@mediatek.com,
Cheng-Yang Chou <yphbchou0911@gmail.com>
Subject: [PATCH sched_ext/for-7.3] sched_ext: Parenthesize local SCX_EVENT defines to fix checkpatch error
Date: Wed, 1 Jul 2026 01:05:35 +0800 [thread overview]
Message-ID: <20260630170544.18772-1-yphbchou0911@gmail.com> (raw)
Fix checkpatch "Macros with complex values should be enclosed in
parentheses" error.
Suggested-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
kernel/sched/ext/ext.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index 0c51f9826a77..a9d23d9f5947 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -4979,7 +4979,7 @@ static ssize_t scx_attr_events_show(struct kobject *kobj,
int at = 0;
scx_read_events(sch, &events);
-#define SCX_EVENT(name) at += scx_attr_event_show(buf, at, &events, name)
+#define SCX_EVENT(name) (at += scx_attr_event_show(buf, at, &events, name))
SCX_EVENTS_LIST(SCX_EVENT);
#undef SCX_EVENT
return at;
@@ -10309,7 +10309,7 @@ static void scx_read_events(struct scx_sched *sch, struct scx_event_stats *event
memset(events, 0, sizeof(*events));
for_each_possible_cpu(cpu) {
struct scx_event_stats *e_cpu = &per_cpu_ptr(sch->pcpu, cpu)->event_stats;
-#define SCX_EVENT(name) events->name += READ_ONCE(e_cpu->name)
+#define SCX_EVENT(name) (events->name += READ_ONCE(e_cpu->name))
SCX_EVENTS_LIST(SCX_EVENT);
#undef SCX_EVENT
}
--
2.43.0
next reply other threads:[~2026-06-30 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 17:05 Cheng-Yang Chou [this message]
2026-06-30 17:46 ` [PATCH sched_ext/for-7.3] sched_ext: Parenthesize local SCX_EVENT defines to fix checkpatch error Tejun Heo
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=20260630170544.18772-1-yphbchou0911@gmail.com \
--to=yphbchou0911@gmail.com \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=chengyang.chou@mediatek.com \
--cc=chia7712@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.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