Commit 4615361f authored by Kuba Piecuch's avatar Kuba Piecuch Committed by Tejun Heo
Browse files

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: default avatarKuba Piecuch <jpiecuch@google.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 3d3667f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
#ifndef __SCX_ENUMS_H
#define __SCX_ENUMS_H

static inline void __ENUM_set(u64 *val, char *type, char *name)
static inline void __ENUM_set(u64 *val, const char *type, const char *name)
{
	bool res;