Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4434406pxf; Tue, 30 Mar 2021 07:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQLN3GpvP5tSOcWZ63Zg/liy89DS/47A368/cO39ZzEHYodlgRwZgtm4b1cY2WL8cFoFlq X-Received: by 2002:aa7:cdcf:: with SMTP id h15mr33744738edw.28.1617115573787; Tue, 30 Mar 2021 07:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617115573; cv=none; d=google.com; s=arc-20160816; b=Aekelpai9vT/1fG5JYL+UFeDcB98+wY/ZW/Gbw0BA6yQWO7lE9Uu1G0YO8RvpQW19T h7NBN14ZZqEidZDMHgFoDRnUO/XoLyfzPz4LmeYEkDdCEq+NJomrvxVnLJTAGMahr81S T0JgH7cl2qkwCDgYyeJz+zF1QxKt05oQ4sQAE/NYaqbGlMu7Y2RU4DowgNjYYY1PWJUN pV0LiBdkCCS3SBtC8eqXFQretzz+33Vsy4uDKiBXa2TEqShtPe6CYjZnQ4vgikwywp6f +fSjoReYZFw/XTAx+VRbIyjXwrkSQkMlG+wENexDvF9Pv6dAV4lCRhtUrA69hxMb/CpS trvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=llTp9KMmNhLgpFrt/A/4gk0SgpNaUf1ZpYpNvho6oEk=; b=t5tLNJLEUXNuBz12ihZuA+NzAFux2R+4P2SLoEcUlhQfcwwCrMH10aixJVZUBA+e1h KbvUkLLJ2/2XAoFss2jNa+Lv1fdUDR1O4XQCtAgS5EuR6PW9sP0Zf1NsbPU6ORA5VUey hUoa6KtliZs07Iuu7HTV10KIeOO9uAmEoq3e4ZJKhuhpOa3JEKIuxy6bc2HPam8Gvuwy owf5AMoiCn/jIAvLlXHwBXYhhOYmEnccvwaNcuDSjNtZkj4EW1n9P4HrbS/C8PkVKBp4 Fzf3BEJ2PwO8LZ5Snkn147AI1oGem5/rdyyRypanq7Uxi2Gp5yNPiZuJXvIAyR7XgGhr vYVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=iKbol1UC; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si16099592edw.146.2021.03.30.07.45.49; Tue, 30 Mar 2021 07:46:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=iKbol1UC; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232226AbhC3OpN (ORCPT + 99 others); Tue, 30 Mar 2021 10:45:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:36728 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231803AbhC3Oo5 (ORCPT ); Tue, 30 Mar 2021 10:44:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617115495; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=llTp9KMmNhLgpFrt/A/4gk0SgpNaUf1ZpYpNvho6oEk=; b=iKbol1UC2cYC03I2rvUtoSu92j1pz2tv1L6/9iiw7cxLhRzh90EQvV5vkd5t59I4w79b5z //6Ea77uYBp+fXZGWtXmCr26hrFxJVsTlICwAL4byi52zB9FKuPbHVzN1zqRgW2z3Slp3o 4tg7hayC693qItZd+Jni902Xu3F2GZQ= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EC1C6B315; Tue, 30 Mar 2021 14:44:54 +0000 (UTC) Date: Tue, 30 Mar 2021 16:44:52 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Arnd Bergmann Cc: Linux Kernel Mailing List , Martin Sebor , Tejun Heo , Zefan Li , Johannes Weiner , the arch/x86 maintainers , Ning Sun , Jani Nikula , Kalle Valo , Simon Kelley , James Smart , "James E.J. Bottomley" , Anders Larsen , Serge Hallyn , Imre Deak , Linux ARM , tboot-devel@lists.sourceforge.net, Intel Graphics , dri-devel , ath11k@lists.infradead.org, linux-wireless , Networking , linux-scsi , Cgroups , LSM List , Roman Gushchin , Christian Brauner , Alexei Starovoitov , Andrii Nakryiko , Odin Ugedal , Cong Wang , Bhaskar Chowdhury Subject: Re: [PATCH 06/11] cgroup: fix -Wzero-length-bounds warnings Message-ID: References: <20210322160253.4032422-1-arnd@kernel.org> <20210322160253.4032422-7-arnd@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9pRQkLwCQMovNrXD" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --9pRQkLwCQMovNrXD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 30, 2021 at 11:00:36AM +0200, Arnd Bergmann 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 --9pRQkLwCQMovNrXD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAmBjOV4ACgkQia1+riC5 qSgZNQ/9FFBZs5QQqEUHmbWyF9O2R2bGF8WCBz56zh+F2OZf+/GK7z4OGhkKUlEa 1lPOUoibt4aZZhWD30RcfB3i3qJ8VqY3wqwnS6W9uN9+sU22sgsx/elCqiua3EnM 4tGDRcLBfSuktgPo1T0oNvGGbFnFJ0kUenLZ6mVkWlSTzx8kp/B8h4S5LkYmRIov fVmHURht22FPiA8wwlUb9LAp8ONF+68t6BtMWNmZbqmJ17qHSnLyQQUiHIHytASt xgaQCJU8/nrtv2xPfp66aCQLO12b6OxpjPoRxo1hj9IP5HZPukzNDat/VaWyh0iE t9GO85K0PVqcuvJpymes0yRT6RvEwlqEna0T+qbh+qih4S3+xRm/Js5IV5m8KfIc wWUve4llNT1jq6zzgn28FkXe9coH7ybpwBaWeAdwEM3Wl9GvXimKwIQqg+3ZDnm4 CbDVh6scYVu3kFYHVy6ld5+fG2GWEKvNL+9AVH+wsXUb6OXtyOtxD3FWyiVVYBkl Q4N0KWETd67BNb2NklxTkeC4hYusuHeFvxa9Ki6K6zbdxDxVwdcTWpWFVkTDs45S sEVkmsPU9pLu5vm5o9kBCmr6q1lW6yzudcxBvcvcHXGQnkfcmDCo+C3OEwKzKUeh 8+BhDV9zMpKBpJfuPiI8UNIt8sI7YeTpjdk14YjWYQTgZCHc7WU= =iFNx -----END PGP SIGNATURE----- --9pRQkLwCQMovNrXD--