]> git.baikalelectronics.ru Git - kernel.git/commit
kernel/ksysfs.c: add __ro_after_init to bin_attribute structure
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 24 Feb 2017 23:00:46 +0000 (15:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2017 01:46:56 +0000 (17:46 -0800)
commit152191c1031aa2a804a6566325f8b39889108cc3
treef588e6b4b3e74b3401516170a04e01f00fc74b65
parentcb460660520b71fcbee61dfd13403e0716131288
kernel/ksysfs.c: add __ro_after_init to bin_attribute structure

The object notes_attr of type bin_attribute is not modified after
getting initailized by ksysfs_init.  Apart from initialization in
ksysfs_init it is also passed as an argument to the function
sysfs_create_bin_file but this argument is of type const.  Therefore,
add __ro_after_init to its declaration.

Link: http://lkml.kernel.org/r/1486839969-16891-1-git-send-email-bhumirks@gmail.com
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/ksysfs.c