From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH 4/6] cgroup: clean up find_css_set() and friends Date: Mon, 24 Jun 2013 18:33:19 +0800 Message-ID: <51C8206F.90404@huawei.com> References: <1371864854-28364-1-git-send-email-tj@kernel.org> <1371864854-28364-5-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1371864854-28364-5-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org On 2013/6/22 9:34, Tejun Heo wrote: > find_css_set() passes uninitialized on-stack template[] array to > find_existing_css_set() which sets the entries for all subsystems. > Passing around an uninitialized array is a bit icky and we want to > introduce an iterator which only iterates loaded subsystems. Let's > initialize it on definition. > > While at it, also make the following cosmetic cleanups. > > * Convert to proper /** comments. > I thought we only use this for external functions, but then I read Documentation/kernel-doc-nano-HOWTO.txt: We also recommend providing kernel-doc formatted documentation for private (file "static") routines, for consistency of kernel source code layout. But this is lower priority and at the discretion of the MAINTAINER of that kernel source file. > * Reorder variable declarations. > > * Replace comment on synchronization with lockdep_assert_held(). > > This patch doesn't make any functional differences. > > Signed-off-by: Tejun Heo > --- > kernel/cgroup.c | 38 +++++++++++++++++--------------------- > 1 file changed, 17 insertions(+), 21 deletions(-) > Acked-by: Li Zefan