mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the pmdomain-fixes tree
@ 2026-11-10 16:33 Mark Brown
  2026-11-10 17:02 ` Sasha Levin
  2026-11-10 18:56 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2026-11-10 16:33 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the pmdomain-fixes tree, today's linux-next build
(arm multi_v7_defconfig) failed like this:

In file included from /tmp/next/build/include/linux/device.h:32,
                 from /tmp/next/build/include/linux/platform_device.h:13,
                 from /tmp/next/build/drivers/pmdomain/imx/gpc.c:11:
/tmp/next/build/drivers/pmdomain/imx/gpc.c: In function 'imx_gpc_remove':
/tmp/next/build/drivers/pmdomain/imx/gpc.c:554:25: error: invalid storage class for function 'imx_gpc_driver_init'
  554 | builtin_platform_driver(imx_gpc_driver)
      |                         ^~~~~~~~~~~~~~
/tmp/next/build/include/linux/device/driver.h:294:19: note: in definition of macro 'builtin_driver'
  294 | static int __init __driver##_init(void) \
      |                   ^~~~~~~~
/tmp/next/build/drivers/pmdomain/imx/gpc.c:554:1: note: in expansion of macro 'builtin_platform_driver'
  554 | builtin_platform_driver(imx_gpc_driver)
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/next/build/include/linux/printk.h:6,
                 from /tmp/next/build/include/asm-generic/bug.h:31,
                 from /tmp/next/build/arch/arm/include/asm/bug.h:60,
                 from /tmp/next/build/include/linux/bug.h:5,
                 from /tmp/next/build/include/linux/instrumented.h:10,
                 from /tmp/next/build/include/linux/atomic/atomic-instrumented.h:17,
                 from /tmp/next/build/include/linux/atomic.h:82,
                 from /tmp/next/build/include/asm-generic/bitops/lock.h:5,
                 from /tmp/next/build/arch/arm/include/asm/bitops.h:245,
                 from /tmp/next/build/include/linux/bitops.h:67,
                 from /tmp/next/build/include/linux/kernel.h:23,
                 from /tmp/next/build/include/linux/clk.h:13,
                 from /tmp/next/build/drivers/pmdomain/imx/gpc.c:7:
/tmp/next/build/drivers/pmdomain/imx/gpc.c:554:25: error: initializer element is not constant
  554 | builtin_platform_driver(imx_gpc_driver)
      |                         ^~~~~~~~~~~~~~
/tmp/next/build/include/linux/init.h:265:55: note: in definition of macro '____define_initcall'
  265 |                 __attribute__((__section__(__sec))) = fn;
      |                                                       ^~
/tmp/next/build/include/linux/init.h:275:9: note: in expansion of macro '__unique_initcall'
  275 |         __unique_initcall(fn, id, __sec, __initcall_id(fn))
      |         ^~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/init.h:277:35: note: in expansion of macro '___define_initcall'
  277 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
      |                                   ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/init.h:306:41: note: in expansion of macro '__define_initcall'
  306 | #define device_initcall(fn)             __define_initcall(fn, 6)
      |                                         ^~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/device/driver.h:298:1: note: in expansion of macro 'device_initcall'
  298 | device_initcall(__driver##_init);
      | ^~~~~~~~~~~~~~~
/tmp/next/build/include/linux/platform_device.h:345:9: note: in expansion of macro 'builtin_driver'
  345 |         builtin_driver(__platform_driver, platform_driver_register)
      |         ^~~~~~~~~~~~~~
/tmp/next/build/drivers/pmdomain/imx/gpc.c:554:1: note: in expansion of macro 'builtin_platform_driver'
  554 | builtin_platform_driver(imx_gpc_driver)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/init.h:176:30: error: expected declaration or statement at end of input
  176 | #define THIS_MODULE ((struct module *)0)
      |                              ^~~~~~
/tmp/next/build/include/linux/platform_device.h:304:41: note: in expansion of macro 'THIS_MODULE'
  304 |         __platform_driver_register(drv, THIS_MODULE, KBUILD_MODNAME)
      |                                         ^~~~~~~~~~~
/tmp/next/build/include/linux/device/driver.h:296:16: note: in expansion of macro 'platform_driver_register'
  296 |         return __register(&(__driver) , ##__VA_ARGS__); \
      |                ^~~~~~~~~~
/tmp/next/build/include/linux/platform_device.h:345:9: note: in expansion of macro 'builtin_driver'
  345 |         builtin_driver(__platform_driver, platform_driver_register)
      |         ^~~~~~~~~~~~~~
/tmp/next/build/drivers/pmdomain/imx/gpc.c:554:1: note: in expansion of macro 'builtin_platform_driver'
  554 | builtin_platform_driver(imx_gpc_driver)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/pmdomain/imx/gpc.c: At top level:
/tmp/next/build/drivers/pmdomain/imx/gpc.c:503:13: warning: 'imx_gpc_remove' defined but not used [-Wunused-function]
  503 | static void imx_gpc_remove(struct platform_device *pdev)
      |             ^~~~~~~~~~~~~~

AFAICT this is caused by commit

   d7262971a2acc (pmdomain: imx: gpc: remove all initialized power domains)

though I don't really see how.  I have used the tree from next-20261109
instead.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of the pmdomain-fixes tree
  2026-11-10 16:33 linux-next: build failure after merge of the pmdomain-fixes tree Mark Brown
@ 2026-11-10 17:02 ` Sasha Levin
  2026-11-10 17:07   ` Mark Brown
  2026-11-10 18:56 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2026-11-10 17:02 UTC (permalink / raw)
  To: Mark Brown
  Cc: Ulf Hansson, Ulf Hansson, Guangshuo Li, Andy Shevchenko,
	linux-pm, imx, Linux Kernel Mailing List,
	Linux Next Mailing List

On Tue, Nov 10, 2026 at 04:33:47PM +0000, Mark Brown wrote:
>AFAICT this is caused by commit
>
>   d7262971a2acc (pmdomain: imx: gpc: remove all initialized power domains)
>
>though I don't really see how.  I have used the tree from next-20261109
>instead.

The while loop that commit adds to imx_gpc_remove() is never closed, so
the function is still open at the end of the file:

		while (num_domains--) {
			ret = pm_genpd_remove(&imx_gpc_domains[num_domains].base);
			if (ret) {
				...
				return;
			}

		if (num_domains == GPC_PGC_DOMAIN_PU)
			imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
	}

The patch was posted that way [1]. gpc.c is only built with
HAVE_IMX_GPC, which only SOC_IMX6 on 32-bit ARM selects, so x86 and
arm64 builds do not see it.

With the brace added, gpc.o builds with imx_v6_v7_defconfig:

--- a/drivers/pmdomain/imx/gpc.c
+++ b/drivers/pmdomain/imx/gpc.c
@@ -536,8 +536,9 @@
 				return;
 			}
 
-		if (num_domains == GPC_PGC_DOMAIN_PU)
-			imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
+			if (num_domains == GPC_PGC_DOMAIN_PU)
+				imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
+		}
 	}
 
 	of_node_put(pgc_node);

[1] https://lore.kernel.org/all/20260924142520.1594149-1-lgs201920130244@gmail.com/

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of the pmdomain-fixes tree
  2026-11-10 17:02 ` Sasha Levin
@ 2026-11-10 17:07   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2026-11-10 17:07 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Ulf Hansson, Ulf Hansson, Guangshuo Li, Andy Shevchenko,
	linux-pm, imx, Linux Kernel Mailing List,
	Linux Next Mailing List

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

On Tue, Nov 10, 2026 at 12:02:53PM -0500, Sasha Levin wrote:
> On Tue, Nov 10, 2026 at 04:33:47PM +0000, Mark Brown wrote:
> >AFAICT this is caused by commit
> >
> >   d7262971a2acc (pmdomain: imx: gpc: remove all initialized power domains)
> >
> >though I don't really see how.  I have used the tree from next-20261109
> >instead.

> The while loop that commit adds to imx_gpc_remove() is never closed, so
> the function is still open at the end of the file:

Ah, that'd do it.  I didn't look terribly hard.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of the pmdomain-fixes tree
  2026-11-10 16:33 linux-next: build failure after merge of the pmdomain-fixes tree Mark Brown
  2026-11-10 17:02 ` Sasha Levin
@ 2026-11-10 18:56 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2026-11-10 18:56 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

On Tue, Nov 10, 2026 at 04:33:51PM +0000, Mark Brown wrote:
> Hi all,
> 
> After merging the pmdomain-fixes tree, today's linux-next build
> (arm multi_v7_defconfig) failed like this:

This also affects the pmdomain tree.  Also, I still had your Linaro
address as a contact for all your trees - I've updated this to your
kernel.org one since the Linaro one started bouncing.

> In file included from /tmp/next/build/include/linux/device.h:32,
>                  from /tmp/next/build/include/linux/platform_device.h:13,
>                  from /tmp/next/build/drivers/pmdomain/imx/gpc.c:11:
> /tmp/next/build/drivers/pmdomain/imx/gpc.c: In function 'imx_gpc_remove':
> /tmp/next/build/drivers/pmdomain/imx/gpc.c:554:25: error: invalid storage class for function 'imx_gpc_driver_init'
>   554 | builtin_platform_driver(imx_gpc_driver)
>       |                         ^~~~~~~~~~~~~~
> /tmp/next/build/include/linux/device/driver.h:294:19: note: in definition of macro 'builtin_driver'
>   294 | static int __init __driver##_init(void) \
>       |                   ^~~~~~~~
> /tmp/next/build/drivers/pmdomain/imx/gpc.c:554:1: note: in expansion of macro 'builtin_platform_driver'
>   554 | builtin_platform_driver(imx_gpc_driver)
>       | ^~~~~~~~~~~~~~~~~~~~~~~
> In file included from /tmp/next/build/include/linux/printk.h:6,
>                  from /tmp/next/build/include/asm-generic/bug.h:31,
>                  from /tmp/next/build/arch/arm/include/asm/bug.h:60,
>                  from /tmp/next/build/include/linux/bug.h:5,
>                  from /tmp/next/build/include/linux/instrumented.h:10,
>                  from /tmp/next/build/include/linux/atomic/atomic-instrumented.h:17,
>                  from /tmp/next/build/include/linux/atomic.h:82,
>                  from /tmp/next/build/include/asm-generic/bitops/lock.h:5,
>                  from /tmp/next/build/arch/arm/include/asm/bitops.h:245,
>                  from /tmp/next/build/include/linux/bitops.h:67,
>                  from /tmp/next/build/include/linux/kernel.h:23,
>                  from /tmp/next/build/include/linux/clk.h:13,
>                  from /tmp/next/build/drivers/pmdomain/imx/gpc.c:7:
> /tmp/next/build/drivers/pmdomain/imx/gpc.c:554:25: error: initializer element is not constant
>   554 | builtin_platform_driver(imx_gpc_driver)
>       |                         ^~~~~~~~~~~~~~
> /tmp/next/build/include/linux/init.h:265:55: note: in definition of macro '____define_initcall'
>   265 |                 __attribute__((__section__(__sec))) = fn;
>       |                                                       ^~
> /tmp/next/build/include/linux/init.h:275:9: note: in expansion of macro '__unique_initcall'
>   275 |         __unique_initcall(fn, id, __sec, __initcall_id(fn))
>       |         ^~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/init.h:277:35: note: in expansion of macro '___define_initcall'
>   277 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
>       |                                   ^~~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/init.h:306:41: note: in expansion of macro '__define_initcall'
>   306 | #define device_initcall(fn)             __define_initcall(fn, 6)
>       |                                         ^~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/device/driver.h:298:1: note: in expansion of macro 'device_initcall'
>   298 | device_initcall(__driver##_init);
>       | ^~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/platform_device.h:345:9: note: in expansion of macro 'builtin_driver'
>   345 |         builtin_driver(__platform_driver, platform_driver_register)
>       |         ^~~~~~~~~~~~~~
> /tmp/next/build/drivers/pmdomain/imx/gpc.c:554:1: note: in expansion of macro 'builtin_platform_driver'
>   554 | builtin_platform_driver(imx_gpc_driver)
>       | ^~~~~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/init.h:176:30: error: expected declaration or statement at end of input
>   176 | #define THIS_MODULE ((struct module *)0)
>       |                              ^~~~~~
> /tmp/next/build/include/linux/platform_device.h:304:41: note: in expansion of macro 'THIS_MODULE'
>   304 |         __platform_driver_register(drv, THIS_MODULE, KBUILD_MODNAME)
>       |                                         ^~~~~~~~~~~
> /tmp/next/build/include/linux/device/driver.h:296:16: note: in expansion of macro 'platform_driver_register'
>   296 |         return __register(&(__driver) , ##__VA_ARGS__); \
>       |                ^~~~~~~~~~
> /tmp/next/build/include/linux/platform_device.h:345:9: note: in expansion of macro 'builtin_driver'
>   345 |         builtin_driver(__platform_driver, platform_driver_register)
>       |         ^~~~~~~~~~~~~~
> /tmp/next/build/drivers/pmdomain/imx/gpc.c:554:1: note: in expansion of macro 'builtin_platform_driver'
>   554 | builtin_platform_driver(imx_gpc_driver)
>       | ^~~~~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/drivers/pmdomain/imx/gpc.c: At top level:
> /tmp/next/build/drivers/pmdomain/imx/gpc.c:503:13: warning: 'imx_gpc_remove' defined but not used [-Wunused-function]
>   503 | static void imx_gpc_remove(struct platform_device *pdev)
>       |             ^~~~~~~~~~~~~~
> 
> AFAICT this is caused by commit
> 
>    d7262971a2acc (pmdomain: imx: gpc: remove all initialized power domains)
> 
> though I don't really see how.  I have used the tree from next-20261109
> instead.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-10 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 16:33 linux-next: build failure after merge of the pmdomain-fixes tree Mark Brown
2026-11-10 17:02 ` Sasha Levin
2026-11-10 17:07   ` Mark Brown
2026-11-10 18:56 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®