]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: convert for_each_subsys_which() to do-while style
authorTejun Heo <tj@kernel.org>
Tue, 23 Feb 2016 03:25:46 +0000 (22:25 -0500)
committerTejun Heo <tj@kernel.org>
Tue, 23 Feb 2016 03:25:46 +0000 (22:25 -0500)
commit58e2222424ed89fa44d2242d86815d82a83d3e1b
treed6c5d9b3b85f8ed897a8b8c4f8baef64432aa42b
parentfe867c3e61bbe76c58667af6297d07ed6f7a9640
cgroup: convert for_each_subsys_which() to do-while style

for_each_subsys_which() allows iterating subsystems specified in a
subsystem bitmask; unfortunately, it requires the mask to be an
unsigned long l-value which can be inconvenient and makes it awkward
to use a smaller type for subsystem masks.

This patch converts for_each_subsy_which() to do-while style which
allows it to drop the l-value requirement.  The new iterator is named
do_each_subsys_mask() / while_each_subsys_mask().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Aleksa Sarai <cyphar@cyphar.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
kernel/cgroup.c