Thread (28 messages) 28 messages, 6 authors, 2022-02-11

Re: [PATCH 02/12] cgroup: rstat: Make cgroup_rstat_cpu_lock name readable

From: Tejun Heo <tj@kernel.org>
Date: 2022-02-08 18:46:48
Also in: lkml

On Tue, Feb 08, 2022 at 10:41:58AM -0800, Namhyung Kim wrote:
The raw_spin_lock_init() uses the argument to name its lockdep map.
But passing per_cpu_ptr() macro directly makes it a very very long
name as it expanded like below:

  ({ do { const void *__vpp_verify = (typeof((&cgroup_rstat_cpu_lock) ...

Let's fix it by passing a local variable instead.  With this change,
the name now looks like:

  cgrp_rstat_cpu_lock

Cc: Tejun Heo <tj@kernel.org>
Cc: Zefan Li <redacted>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: cgroups@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>

but maybe add a comment explaining what's going on?

Thanks.

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