Re: [PATCH] dcache: use QSTR() instead of QSTR_INIT()

From: Al Viro

Date: Wed Apr 22 2026 - 10:34:35 EST


On Wed, Apr 22, 2026 at 02:33:46PM +0200, Thorsten Blum wrote:
> Drop the hard-coded length arguments and use the simpler QSTR().

... which is not a constant expression. NAK.

QSTR_INIT() is an initializer list for struct qstr; QSTR() is a
compound literal for the same. IOW, its value is an anonymous
local variable with given contents.

C grammar allows both
struct foo x = {.bar = y};
and
struct foo x = (struct foo){.bar = y};
for auto variables, and compiler is able to figure out that they
are equivalent. But the second form is not legal for the static-duration
variables.