提交 da20dfe6 编写于 作者: K Kees Cook 提交者: James Morris

fs: fix over-zealous use of "const"

When I was fixing up const recommendations from checkpatch.pl, I went
overboard. This fixes the warning (during a W=1 build):

include/linux/fs.h:2627:74: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id)
Reported-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NJames Morris <james.l.morris@oracle.com>
上级 9b091556
...@@ -2600,7 +2600,7 @@ static const char * const kernel_read_file_str[] = { ...@@ -2600,7 +2600,7 @@ static const char * const kernel_read_file_str[] = {
__kernel_read_file_id(__fid_stringify) __kernel_read_file_id(__fid_stringify)
}; };
static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id) static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id)
{ {
if (id < 0 || id >= READING_MAX_ID) if (id < 0 || id >= READING_MAX_ID)
return kernel_read_file_str[READING_UNKNOWN]; return kernel_read_file_str[READING_UNKNOWN];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册