From: Tejun Heo <tj@kernel.org>
To: Zhao Mengmeng <zhaomzhao@126.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: void@manifault.com, arighi@nvidia.com, changwoo@igalia.com,
zhaomengmeng@kylinos.cn, emil@etsalapatis.com,
Tejun Heo <tj@kernel.org>
Subject: [PATCH sched_ext/for-7.1] tools/sched_ext: Remove redundant SCX_ENQ_IMMED compat definition
Date: Thu, 26 Mar 2026 10:13:54 -1000 [thread overview]
Message-ID: <20260326201354.2837750-1-tj@kernel.org> (raw)
In-Reply-To: <20260326100313.338388-1-zhaomzhao@126.com>
compat.bpf.h defined a fallback SCX_ENQ_IMMED macro using
__COMPAT_ENUM_OR_ZERO(). After 6bf36c68b0a2 ("tools/sched_ext:
Regenerate autogen enum headers") added SCX_ENQ_IMMED to the autogen
headers, including both triggers -Wmacro-redefined warnings.
The autogen definition through const volatile __weak already resolves to
0 on older kernels, providing the same backward compatibility. Remove
the now-redundant compat fallback.
Fixes: 6bf36c68b0a2 ("tools/sched_ext: Regenerate autogen enum headers")
Link: https://lore.kernel.org/r/20260326100313.338388-1-zhaomzhao@126.com
Reported-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
tools/sched_ext/include/scx/compat.bpf.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/tools/sched_ext/include/scx/compat.bpf.h b/tools/sched_ext/include/scx/compat.bpf.h
index 654b566bd94a..8977b5a2caa1 100644
--- a/tools/sched_ext/include/scx/compat.bpf.h
+++ b/tools/sched_ext/include/scx/compat.bpf.h
@@ -422,11 +422,6 @@ static inline void scx_bpf_dsq_reenq(u64 dsq_id, u64 reenq_flags)
scx_bpf_error("kernel too old to reenqueue foreign local or user DSQs");
}
-/*
- * v7.1: %SCX_ENQ_IMMED.
- */
-#define SCX_ENQ_IMMED __COMPAT_ENUM_OR_ZERO(enum scx_enq_flags, SCX_ENQ_IMMED)
-
/*
* Define sched_ext_ops. This may be expanded to define multiple variants for
* backward compatibility. See compat.h::SCX_OPS_LOAD/ATTACH().
--
2.53.0
next prev parent reply other threads:[~2026-03-26 20:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 10:03 [PATCH] tools/sched_ext: avoid redefining SCX_ENQ_IMMED Zhao Mengmeng
2026-03-26 20:13 ` Tejun Heo [this message]
2026-03-26 20:16 ` [PATCH sched_ext/for-7.1] tools/sched_ext: Remove redundant SCX_ENQ_IMMED compat definition Tejun Heo
2026-03-26 20:14 ` [PATCH] tools/sched_ext: avoid redefining SCX_ENQ_IMMED 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=20260326201354.2837750-1-tj@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=void@manifault.com \
--cc=zhaomengmeng@kylinos.cn \
--cc=zhaomzhao@126.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®