public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Andrew Morton <akpm@linux-foundation•org>
Cc: Yury Norov <yury.norov@gmail•com>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: build failure after merge of the mm-nonmm-unstable branch of the mm tree
Date: Wed, 17 Jan 2024 09:22:09 +1100	[thread overview]
Message-ID: <20240117092209.7157a9c2@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/uapi/linux/posix_types.h:5,
                 from include/uapi/linux/types.h:14,
                 from include/linux/types.h:6,
                 from include/linux/kasan-checks.h:5,
                 from include/asm-generic/rwonce.h:26,
                 from ./arch/powerpc/include/generated/asm/rwonce.h:1,
                 from include/linux/compiler.h:251,
                 from include/linux/array_size.h:5,
                 from include/linux/kernel.h:16,
                 from lib/group_cpus.c:6:
lib/group_cpus.c: In function 'group_cpus_evenly':
include/linux/stddef.h:8:14: error: invalid initializer
    8 | #define NULL ((void *)0)
      |              ^
lib/group_cpus.c:356:59: note: in expansion of macro 'NULL'
  356 |         cpumask_var_t npresmsk __free(free_cpumask_var) = NULL;
      |                                                           ^~~~

Caused by commit

  f004021b058f ("lib/group_cpus: fix initialization section in group_cpus_evenly()")

CONFIG_CPUMASK_OFFSTACK is not set for this build (so cpumask_var_t is
an single element array, not a pointer).

I applied this hack for today:

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Wed, 17 Jan 2024 09:15:07 +1100
Subject: [PATCH] fix up for "lib/group_cpus: fix initialization section in group_cpus_evenly()"

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 lib/group_cpus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/group_cpus.c b/lib/group_cpus.c
index c9c95b21e6c6..2c54b49d4c59 100644
--- a/lib/group_cpus.c
+++ b/lib/group_cpus.c
@@ -353,7 +353,11 @@ struct cpumask *group_cpus_evenly(unsigned int numgrps)
 {
 	cpumask_var_t *node_to_cpumask __free(free_node_to_cpumask) = alloc_node_to_cpumask();
 	struct cpumask *masks __free(kfree) = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL);
+#ifdef CONFIG_CPUMASK_OFFSTACK
 	cpumask_var_t npresmsk __free(free_cpumask_var) = NULL;
+#else
+	cpumask_var_t npresmsk __free(free_cpumask_var);
+#endif
 	int curgrp, nr_present, nr_others;
 
 	if (!masks || !node_to_cpumask || !alloc_cpumask_var(&npresmsk, GFP_KERNEL))
-- 
2.43.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

                 reply	other threads:[~2024-01-16 22:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240117092209.7157a9c2@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=yury.norov@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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