diff options
author | Nick Desaulniers <nick.desaulniers@gmail.com> | 2017-05-21 01:58:07 -0700 |
---|---|---|
committer | Alistair Strachan <astrachan@google.com> | 2018-05-04 21:20:49 +0000 |
commit | 720dfa9a4c3bacd955af2f53a2fb7bbca53ac10a (patch) | |
tree | dd0fd0585b7a84abe7a003dabcc95f0c89b879ad /include/linux/sysfs.h | |
parent | 4ecc6a3658d82b419306fe95573ee1dbd957a61c (diff) |
UPSTREAM: sysfs: remove signedness from sysfs_get_dirent
sysfs_get_dirent is usually invoked with a string literal, which
have the type char[]. While the toplevel Makefile
disables -Wpointer-sign, other Makefiles like
arch/x86/boot/compressed/Makefile
redefine KBUILD_CFLAGS. Fixes the warning:
In file included from arch/x86/boot/compressed/kaslr.c:17:
In file included from ./include/linux/module.h:17:
In file included from ./include/linux/kobject.h:21:
./include/linux/sysfs.h:517:37: warning: passing 'const unsigned char *'
to parameter of
type 'const char *' converts between pointers to integer types
with different sign
[-Wpointer-sign]
return kernfs_find_and_get(parent, name);
^~~~
./include/linux/kernfs.h:462:57: note: passing argument to parameter
'name' here
kernfs_find_and_get(struct kernfs_node *kn, const char *name)
^
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 89cf2a20c3f13dbb4c15a0c6d2e390e700992173)
Bug: 78886293
Change-Id: Ic03f7b132fbf67b3543462448aa3f3633eae49a6
Signed-off-by: Alistair Strachan <astrachan@google.com>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 00a1f330f93a..9c452f6db438 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -518,7 +518,7 @@ static inline void sysfs_notify_dirent(struct kernfs_node *kn) } static inline struct kernfs_node *sysfs_get_dirent(struct kernfs_node *parent, - const unsigned char *name) + const char *name) { return kernfs_find_and_get(parent, name); } |