From: Andrew Morton Date: Mon, 23 Aug 2021 23:59:34 +0000 (+1000) Subject: mm-mempolicy-convert-from-atomic_t-to-refcount_t-on-mempolicy-refcnt-fix X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=74b9dc76d42a3fbf67556077ad343015bbff22e0;p=users%2Fjedix%2Flinux-maple.git mm-mempolicy-convert-from-atomic_t-to-refcount_t-on-mempolicy-refcnt-fix fix warnings mm/mempolicy.c:125:42: warning: missing braces around initializer [-Wmissing-braces] 125 | static struct mempolicy default_policy = { | ^ mm/mempolicy.c:125:42: warning: missing braces around initializer [-Wmissing-braces] mm/mempolicy.c: In function 'numa_policy_init': mm/mempolicy.c:2815:32: warning: missing braces around initializer [-Wmissing-braces] 2815 | preferred_node_policy[nid] = (struct mempolicy) { | ^ mm/mempolicy.c:2815:32: warning: missing braces around initializer [-Wmissing-braces] Cc: Xiyu Yang Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1dd82b817234..6e92d6b01152 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -120,7 +120,7 @@ enum zone_type policy_zone = 0; * run-time system-wide default policy => local allocation */ static struct mempolicy default_policy = { - .refcnt = ATOMIC_INIT(1), /* never free it */ + .refcnt = { ATOMIC_INIT(1), }, /* never free it */ .mode = MPOL_LOCAL, }; @@ -2775,7 +2775,7 @@ void __init numa_policy_init(void) for_each_node(nid) { preferred_node_policy[nid] = (struct mempolicy) { - .refcnt = ATOMIC_INIT(1), + .refcnt = { ATOMIC_INIT(1), }, .mode = MPOL_PREFERRED, .flags = MPOL_F_MOF | MPOL_F_MORON, .nodes = nodemask_of_node(nid),