# Re: \[PATCH 06/11\] cgroup: fix -Wzero-length-bounds warnings

- From: Michal Koutný \<mkoutny@suse.com\>
- Date: 2021-03-30 14:45:45 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/03/6321337
- Thread: https://ratatoskr.run/linux-arm-kernel/2021/03/6310878/t.md

```text
On Tue, Mar 30, 2021 at 11:00:36AM +0200, Arnd Bergmann [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
```

## Attachments

- [signature.asc](https://ratatoskr.run/netdev/2021/03/6321337/attachment/0) (application/pgp-signature, 833 bytes)
