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

Michal Koutný mkoutny at suse.com
Tue Mar 30 08:41:34 UTC 2021


On Mon, Mar 22, 2021 at 05:02:44PM +0100, Arnd Bergmann <arnd at kernel.org> wrote:
> I'm not sure what is expected to happen for such a configuration,
> presumably these functions are never calls in that case.
Yes, the functions you patched would only be called from subsystems or
there should be no way to obtain a struct cgroup_subsys reference
anyway (hence it's ok to always branch as if ss==NULL).

I'd prefer a variant that wouldn't compile the affected codepaths when
there are no subsystems registered, however, I couldn't come up with a
way how to do it without some preprocessor ugliness.

Reviewed-by: Michal Koutný <mkoutny at suse.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210330/78e8e01d/attachment-0001.sig>


More information about the dri-devel mailing list