]> git.ipfire.org Git - thirdparty/linux.git/commit
sched_ext: Make string params of __ENUM_set() const
authorKuba Piecuch <jpiecuch@google.com>
Mon, 13 Apr 2026 12:49:02 +0000 (12:49 +0000)
committerTejun Heo <tj@kernel.org>
Mon, 13 Apr 2026 16:14:05 +0000 (06:14 -1000)
commit4615361f0b148c172852590e6245a953cc075b73
treee67f4b918938c0e9f32e81fdf524f1473184c71e
parent3d3667f265148d856bc6eb54d1bd780a94e38da7
sched_ext: Make string params of __ENUM_set() const

A small change to improve type safety/const correctness.
__COMPAT_read_enum() already has const string parameters.

It fixes a warning when using the header in C++ code:

  error: ISO C++11 does not allow conversion from string literal
         to 'char *' [-Werror,-Wwritable-strings]

That's because string literals have type char[N] in C and
const char[N] in C++.

Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/sched_ext/include/scx/enums.h