linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Li Zefan <lizefan@huawei.com>
Cc: Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Cgroups <cgroups@vger.kernel.org>
Subject: Re: [PATCH 2/3] cgroup: add cgroup_name() API
Date: Fri, 1 Mar 2013 20:39:17 +0000	[thread overview]
Message-ID: <20130301203917.GT4503@ZenIV.linux.org.uk> (raw)
In-Reply-To: <51304C6D.8050207@huawei.com>

On Fri, Mar 01, 2013 at 02:36:29PM +0800, Li Zefan wrote:
> On 2013/2/28 22:49, Tejun Heo wrote:
> > On Wed, Feb 27, 2013 at 10:53 PM, Li Zefan <lizefan@huawei.com> wrote:
> >>> static const struct cgroup_name root_cgroup_name = { .name = "/" };
> >>
> >> Can't... That's char name[0] not char *name.
> > 
> > Flexible array members can be statically initialized. If you wanna be
> > really anal about it, you can do it manually with a wrapping struct
> > but I don't think that would be necessary.
> > 
> 
> I didn't know this difference between flexible array and zero-size array.
> Thanks.

Mind you, initializing flex array member is explicitly invalid per C99;
it's a GNU extension...

  reply	other threads:[~2013-03-01 20:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25  6:17 [PATCH v3 1/3] cgroup: fix cgroup_path() vs rename() race Li Zefan
2013-02-25  6:17 ` [PATCH 2/3] cgroup: add cgroup_name() API Li Zefan
2013-02-26  2:27   ` Tejun Heo
2013-02-26 10:25     ` Li Zefan
2013-02-26 13:26       ` Tejun Heo
2013-02-27 10:49         ` Li Zefan
2013-02-27 13:23           ` Tejun Heo
2013-02-28  6:53             ` Li Zefan
2013-02-28 14:49               ` Tejun Heo
2013-03-01  6:36                 ` Li Zefan
2013-03-01 20:39                   ` Al Viro [this message]
2013-03-01 20:45                     ` Tejun Heo
2013-03-04  3:02                       ` Li Zefan
2013-03-04 17:38                         ` Tejun Heo
2013-02-25  6:18 ` [PATCH 3/3] cpuset: use cgroup_name() in cpuset_print_task_mems_allowed() Li Zefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130301203917.GT4503@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).