Skip to contentSkip to conversation

linux-next: build failure after merge of the drm tree

PATCH Mark Brown 6 participants 6 messages Jun 28, 2024 – Jul 24, 2024

Subsystems (5)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

After merging the drm tree and then some other trees which seem to have allowed the driver to be built much later in the merge process today's linux-next build (x86_64 allmodconfig) failed like this:

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
1212 | .remove = lvds_remove,

      |                   ^~~~~~~~~~~

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: note: (near initialization for 'lvds_platform_driver.<anonymous>.remove')

Caused by commit

6597efcfc53585d5 ("drm/stm: Allow build with COMPILE_TEST=y")

interacting with

aca1cbc1c9860e39 ("drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver") 0edb555a65d1ef04 ("platform: Make platform_driver::remove() return void")

I have applied the below fixup patch.

From 59a5e11f41e93512ca1a5aed36c1c396d175797d Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Fri, 28 Jun 2024 20:45:16 +0100
Subject: [PATCH] drm: Fix up STM LVDS driver for void remove() conversion

---
 drivers/gpu/drm/stm/lvds.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/stm/lvds.c +1 -3
index bfc8cb13fbc5c..2fa2c81784e97 100644
@@ -1186,15 +1186,13 @@ static int lvds_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int lvds_remove(struct platform_device *pdev)
+static void lvds_remove(struct platform_device *pdev)
 {
 	struct stm_lvds *lvds = platform_get_drvdata(pdev);
 
 	lvds_pixel_clk_unregister(lvds);
 
 	drm_bridge_remove(&lvds->lvds_bridge);
-
-	return 0;
 }
 
 static const struct of_device_id lvds_dt_ids[] = {
Signature · 1 line
2.39.2
#1 lore raw
Quoted 56 lines · Mark Brown

Hi all,

After merging the drm tree and then some other trees which seem to have allowed the driver to be built much later in the merge process today's linux-next build (x86_64 allmodconfig) failed like this:

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
1212 | .remove = lvds_remove,

      |                   ^~~~~~~~~~~

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: note: (near initialization for 'lvds_platform_driver.<anonymous>.remove')

Caused by commit

6597efcfc53585d5 ("drm/stm: Allow build with COMPILE_TEST=y")

interacting with

aca1cbc1c9860e39 ("drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver") 0edb555a65d1ef04 ("platform: Make platform_driver::remove() return void")

I have applied the below fixup patch.

From 59a5e11f41e93512ca1a5aed36c1c396d175797d Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Fri, 28 Jun 2024 20:45:16 +0100
Subject: [PATCH] drm: Fix up STM LVDS driver for void remove() conversion

---
 drivers/gpu/drm/stm/lvds.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/stm/lvds.c +1 -3
index bfc8cb13fbc5c..2fa2c81784e97 100644
@@ -1186,15 +1186,13 @@ static int lvds_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int lvds_remove(struct platform_device *pdev)
+static void lvds_remove(struct platform_device *pdev)
 {
 	struct stm_lvds *lvds = platform_get_drvdata(pdev);
 
 	lvds_pixel_clk_unregister(lvds);
 
 	drm_bridge_remove(&lvds->lvds_bridge);
-
-	return 0;
 }
 
 static const struct of_device_id lvds_dt_ids[] = {
Signature · 1 line
2.39.2

Looks good, thanks!

greg k-h

maintainer
#2 lore raw
Quoted 53 lines · Greg Kroah-Hartman
Quoted 52 lines · Mark Brown

Hi all,

After merging the drm tree and then some other trees which seem to have allowed the driver to be built much later in the merge process today's linux-next build (x86_64 allmodconfig) failed like this:

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
1212 | .remove = lvds_remove,

       |                   ^~~~~~~~~~~

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: note: (near initialization for 'lvds_platform_driver.<anonymous>.remove')

Caused by commit

   6597efcfc53585d5 ("drm/stm: Allow build with COMPILE_TEST=y")

interacting with

aca1cbc1c9860e39 ("drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver") 0edb555a65d1ef04 ("platform: Make platform_driver::remove() return void")

I have applied the below fixup patch.

From 59a5e11f41e93512ca1a5aed36c1c396d175797d Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Fri, 28 Jun 2024 20:45:16 +0100
Subject: [PATCH] drm: Fix up STM LVDS driver for void remove() conversion

---
  drivers/gpu/drm/stm/lvds.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/stm/lvds.c +1 -3
index bfc8cb13fbc5c..2fa2c81784e97 100644
@@ -1186,15 +1186,13 @@ static int lvds_probe(struct platform_device *pdev)
  	return ret;
  }
 
-static int lvds_remove(struct platform_device *pdev)
+static void lvds_remove(struct platform_device *pdev)
  {
  	struct stm_lvds *lvds = platform_get_drvdata(pdev);
 
  	lvds_pixel_clk_unregister(lvds);
 
  	drm_bridge_remove(&lvds->lvds_bridge);
-
-	return 0;
  }
 
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/stm/lvds.c +0 -0
  static const struct of_device_id lvds_dt_ids[] = {
Signature · 1 line
2.39.2

Looks good, thanks!

greg k-h

Hi Mark,
Many thanks for this fix and all my apologies for having creating this issue.
What's next and how can I help?
Philippe :-)
ps: On my side, I am still trying to understand why I did not "catch" this issue that looks "pretty big".

#3 lore raw

Hi Philippe,

Quoted 5 lines · On Mon, 1 Jul 2024 11:41:09 +0200 Philippe CORNU <[email protected]>…

Many thanks for this fix and all my apologies for having creating this issue.
What's next and how can I help?
Philippe :-)
ps: On my side, I am still trying to understand why I did not "catch" this issue that looks "pretty big".

There is nothing for you to do, this fails only when the drm tree is merged with the driver-core tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
#4 lore raw
In reply to Mark Brown

Hi all,

Quoted 42 lines · On Fri, 28 Jun 2024 20:46:49 +0100 Mark Brown <[email protected]> wrote:

After merging the drm tree and then some other trees which seem to have allowed the driver to be built much later in the merge process today's linux-next build (x86_64 allmodconfig) failed like this:

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
1212 | .remove = lvds_remove,

      |                   ^~~~~~~~~~~

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: note: (near initialization for 'lvds_platform_driver.<anonymous>.remove')

Caused by commit

6597efcfc53585d5 ("drm/stm: Allow build with COMPILE_TEST=y")

interacting with

aca1cbc1c9860e39 ("drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver") 0edb555a65d1ef04 ("platform: Make platform_driver::remove() return void")

I have applied the below fixup patch.

From 59a5e11f41e93512ca1a5aed36c1c396d175797d Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Fri, 28 Jun 2024 20:45:16 +0100
Subject: [PATCH] drm: Fix up STM LVDS driver for void remove() conversion

---
 drivers/gpu/drm/stm/lvds.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/stm/lvds.c +1 -1
index bfc8cb13fbc5c..2fa2c81784e97 100644
@@ -1186,15 +1186,13 @@ static int lvds_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int lvds_remove(struct platform_device *pdev)
+static void lvds_remove(struct platform_device *pdev)
 {

drivers/gpu/drm/stm/lvds.c static int lvds_probe(struct platform_device *pdev) · line 1198

Quoted 10 lines
drivers/gpu/drm/stm/lvds.c +0 -2
 	struct stm_lvds *lvds = platform_get_drvdata(pdev);
 
 	lvds_pixel_clk_unregister(lvds);
 
 	drm_bridge_remove(&lvds->lvds_bridge);
-
-	return 0;
 }
 
 static const struct of_device_id lvds_dt_ids[] = {

This is now a conflict between the driver-core tree and Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
#5 lore raw

Hi,

Deep apologies for this mistake.

Is there any way that we can help within our scope ?

Best regards,
Raphaël

Quoted 56 lines · Stephen Rothwell

Hi all,

Quoted 41 lines · On Fri, 28 Jun 2024 20:46:49 +0100 Mark Brown <[email protected]> wrote:

After merging the drm tree and then some other trees which seem to have allowed the driver to be built much later in the merge process today's linux-next build (x86_64 allmodconfig) failed like this:

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
1212 | .remove = lvds_remove,

      |                   ^~~~~~~~~~~

/tmp/next/build/drivers/gpu/drm/stm/lvds.c:1212:19: note: (near initialization for 'lvds_platform_driver.<anonymous>.remove')

Caused by commit

6597efcfc53585d5 ("drm/stm: Allow build with COMPILE_TEST=y")

interacting with

aca1cbc1c9860e39 ("drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver") 0edb555a65d1ef04 ("platform: Make platform_driver::remove() return void")

I have applied the below fixup patch.

From 59a5e11f41e93512ca1a5aed36c1c396d175797d Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Fri, 28 Jun 2024 20:45:16 +0100
Subject: [PATCH] drm: Fix up STM LVDS driver for void remove() conversion

---
 drivers/gpu/drm/stm/lvds.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/stm/lvds.c +1 -1
index bfc8cb13fbc5c..2fa2c81784e97 100644
@@ -1186,15 +1186,13 @@ static int lvds_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int lvds_remove(struct platform_device *pdev)
+static void lvds_remove(struct platform_device *pdev)
 {

drivers/gpu/drm/stm/lvds.c static int lvds_probe(struct platform_device *pdev) · line 1198

Quoted 10 lines
drivers/gpu/drm/stm/lvds.c +0 -2
 	struct stm_lvds *lvds = platform_get_drvdata(pdev);
 
 	lvds_pixel_clk_unregister(lvds);
 
 	drm_bridge_remove(&lvds->lvds_bridge);
-
-	return 0;
 }
 
 static const struct of_device_id lvds_dt_ids[] = {

This is now a conflict between the driver-core tree and Linus' tree.