diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-03-15 00:21:06 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-03-16 13:32:23 -0700 |
commit | cfe02a8a973e7e5f66926b8ae38dfce404b19e29 (patch) | |
tree | 1ef657e31eb621934765ab25fb82fd716e21a630 /drivers/gpu/drm/amd/amdgpu/atombios_dp.c | |
parent | 2b021cbf3cb6208f0d40fd2f1869f237934340ed (diff) | |
download | blackbird-op-linux-cfe02a8a973e7e5f66926b8ae38dfce404b19e29.tar.gz blackbird-op-linux-cfe02a8a973e7e5f66926b8ae38dfce404b19e29.zip |
cgroup: avoid false positive gcc-6 warning
When all subsystems are disabled, gcc notices that cgroup_subsys_enabled_key
is a zero-length array and that any access to it must be out of bounds:
In file included from ../include/linux/cgroup.h:19:0,
from ../kernel/cgroup.c:31:
../kernel/cgroup.c: In function 'cgroup_add_cftypes':
../kernel/cgroup.c:261:53: error: array subscript is above array bounds [-Werror=array-bounds]
return static_key_enabled(cgroup_subsys_enabled_key[ssid]);
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../include/linux/jump_label.h:271:40: note: in definition of macro 'static_key_enabled'
static_key_count((struct static_key *)x) > 0; \
^
We should never call the function in this particular case, so this is
not a bug. In order to silence the warning, this adds an explicit check
for the CGROUP_SUBSYS_COUNT==0 case.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/atombios_dp.c')
0 files changed, 0 insertions, 0 deletions