On Fri, Dec 04 2015, Andrew Morton <a...@linux-foundation.org> wrote:
> On Thu, 3 Dec 2015 21:51:13 +0100 Rasmus Villemoes > <li...@rasmusvillemoes.dk> wrote: > >> +static struct dentry test_dentry[4] __initdata = { >> + { .d_parent = &test_dentry[0], >> + .d_name = { .len = 3, .name = test_dentry[0].d_iname }, >> + .d_iname = "foo" }, > > Confused. qstr has no .len. > > lib/test_printf.c:332: error: unknown field 'len' specified in initializer Huh? It goes without saying that I've compiled and run this, and never seen this problem. struct qstr does have a len member, though it's hidden inside an anonymous struct inside an anonymous union. But at least my gcc (4.9) has no problem with those initializers - and fs/dcache.c happily accesses name->len all the time (how else would one get at the member). Also note the lack of 0day complaints. What tool gave that error? Also confused. Rasmus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/