Thread (38 messages) 38 messages, 13 authors, 2021-09-28

Re: [Intel-gfx] [PATCH 06/11] cgroup: fix -Wzero-length-bounds warnings

From: Michal Koutný <mkoutny@suse.com>
Date: 2021-03-30 14:45:45
Also in: ath11k, cgroups, dri-devel, linux-arm-kernel, linux-scsi, linux-security-module, linux-wireless, lkml, netdev

On Tue, Mar 30, 2021 at 11:00:36AM +0200, Arnd Bergmann [off-list ref] wrote:
Would it be possible to enclose most or all of kernel/cgroup/cgroup.c
in an #ifdef CGROUP_SUBSYS_COUNT block?
Even without any controllers, there can still be named hierarchies (v1)
or the default hierarchy (v2) (for instance) for process tracking
purposes. So only parts of kernel/cgroup/cgroup.c could be ifdef'd.

Beware that CGROUP_SUBSYS_COUNT is not known at preprocessing stage (you
could have a macro alternative though).
I didn't try that myself, but this might be a way to guarantee that
there cannot be any callers (it would cause a link error).
Such a guarantee would be nicer, I agree. I tried a bit but anandoned it
when I saw macros proliferate (which I found less readable than your
current variant). But YMMV.

Michal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help