Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932279AbbDMOYt (ORCPT ); Mon, 13 Apr 2015 10:24:49 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:35951 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752789AbbDMOYn (ORCPT ); Mon, 13 Apr 2015 10:24:43 -0400 Date: Mon, 13 Apr 2015 10:24:39 -0400 From: Tejun Heo To: Aleksa Sarai Cc: lizefan@huawei.com, mingo@redhat.com, peterz@infradead.org, richard@nod.at, fweisbec@gmail.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v9 3/4] cgroups: allow a cgroup subsystem to reject a fork Message-ID: <20150413142439.GA2596@htj.duckdns.org> References: <1428799917-15141-1-git-send-email-cyphar@cyphar.com> <1428799917-15141-4-git-send-email-cyphar@cyphar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428799917-15141-4-git-send-email-cyphar@cyphar.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 982 Lines: 32 On Sun, Apr 12, 2015 at 10:51:56AM +1000, Aleksa Sarai wrote: > +/* list of all tags for subsystems */ > +enum cgroup_subsys_tag { > +#define TAG_ID(_t) CGROUP_ ## _t > +#define SUBSYS(_x) UNUSED_IDENT(_x), > +#define TAG(_t) TAG_ID(_t), \ > + UNUSED_IDENT(_t) = TAG_ID(_t) - 2, > +#define _COUNT(_t, _i) _i, \ > + CGROUP_ ## _t ## _COUNT = (TAG_ID(_t ## _END) - TAG_ID(_t ## _START)) + 1, \ > + UNUSED_IDENT(_t) = _i - 1, > +#define COUNT(_t) _COUNT(_t, UNUSED_IDENT(_t)) > +#include > +#undef COUNT > +#undef TAG > +#undef SUBSYS > +#undef TAG_ID > +}; Ummm... is this really necessary? Can't we do something like the following? #define SUBSYS_TAG(tag) \ __##tag, \ tag = __##tag - 2, -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/