Skip to contentSkip to conversation

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

PATCH Stephen Rothwell 2 participants 3 messages Jun 23, 2022 – Jun 27, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the amdgpu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

In file included from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from include/linux/power_supply.h:15,
from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:28:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function 'amdgpu_reset_capture_coredumpm':
include/linux/gfp.h:337:25: error: passing argument 5 of 'dev_coredumpm' makes pointer from integer without a cast [-Werror=int-conversion]

  337 | #define GFP_KERNEL      (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         unsigned int

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4726:55: note: in expansion of macro 'GFP_KERNEL'
4726 | dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
| ^~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:59:30: note: expected 'ssize_t (*)(char *, loff_t, size_t, void *, size_t)' {aka 'long int (*)(char *, long long int, long unsigned int, void *, long unsigned int)'} but argument is of type 'unsigned int'

   59 |                    ssize_t (*read)(char *buffer, loff_t offset, size_t count,
      |                    ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   60 |                                    void *data, size_t datalen),
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4727:23: error: passing argument 6 of 'dev_coredumpm' from incompatible pointer type [-Werror=incompatible-pointer-types]
 4727 |                       amdgpu_devcoredump_read, amdgpu_devcoredump_free);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       ssize_t (*)(char *, loff_t,  size_t,  void *, size_t) {aka long int (*)(char *, long long int,  long unsigned int,  void *, long unsigned int)}
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:61:27: note: expected 'void (*)(void *)' but argument is of type 'ssize_t (*)(char *, loff_t,  size_t,  void *, size_t)' {aka 'long int (*)(char *, long long int,  long unsigned int,  void *, long unsigned int)'}
   61 |                    void (*free)(void *data));
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4726:9: error: too many arguments to function 'dev_coredumpm'
 4726 |         dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
      |         ^~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:57:6: note: declared here
   57 | void dev_coredumpm(struct device *dev, struct module *owner,
      |      ^~~~~~~~~~~~~

cc1: all warnings being treated as errors

Caused by commit

3d8785f6c04a ("drm/amdgpu: adding device coredump support")

interacting with commit

77515ebaf019 ("devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm")

from the driver-core tree.

I have applied the following merge resolution patch for today.

From: Stephen Rothwell <[email protected]>
Date: Thu, 23 Jun 2022 15:56:22 +1000
Subject: [PATCH] fix up for "devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm"

interacting with

3d8785f6c04a ("drm/amdgpu: adding device coredump support")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index f2a4c268ac72..9d6418bb963e 100644
@@ -4723,7 +4723,7 @@ static void amdgpu_reset_capture_coredumpm(struct amdgpu_device *adev)
 	struct drm_device *dev = adev_to_drm(adev);
 
 	ktime_get_ts64(&adev->reset_time);
-	dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
+	dev_coredumpm(dev->dev, THIS_MODULE, adev, 0,
 		      amdgpu_devcoredump_read, amdgpu_devcoredump_free);
 }
 #endif
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 77 lines · Stephen Rothwell

Hi all,

After merging the amdgpu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

In file included from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from include/linux/power_supply.h:15,
from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:28:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function 'amdgpu_reset_capture_coredumpm':
include/linux/gfp.h:337:25: error: passing argument 5 of 'dev_coredumpm' makes pointer from integer without a cast [-Werror=int-conversion]

  337 | #define GFP_KERNEL      (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         unsigned int

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4726:55: note: in expansion of macro 'GFP_KERNEL'
4726 | dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
| ^~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:59:30: note: expected 'ssize_t (*)(char *, loff_t, size_t, void *, size_t)' {aka 'long int (*)(char *, long long int, long unsigned int, void *, long unsigned int)'} but argument is of type 'unsigned int'

   59 |                    ssize_t (*read)(char *buffer, loff_t offset, size_t count,
      |                    ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   60 |                                    void *data, size_t datalen),
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4727:23: error: passing argument 6 of 'dev_coredumpm' from incompatible pointer type [-Werror=incompatible-pointer-types]
 4727 |                       amdgpu_devcoredump_read, amdgpu_devcoredump_free);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       ssize_t (*)(char *, loff_t,  size_t,  void *, size_t) {aka long int (*)(char *, long long int,  long unsigned int,  void *, long unsigned int)}
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:61:27: note: expected 'void (*)(void *)' but argument is of type 'ssize_t (*)(char *, loff_t,  size_t,  void *, size_t)' {aka 'long int (*)(char *, long long int,  long unsigned int,  void *, long unsigned int)'}
   61 |                    void (*free)(void *data));
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4726:9: error: too many arguments to function 'dev_coredumpm'
 4726 |         dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
      |         ^~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:57:6: note: declared here
   57 | void dev_coredumpm(struct device *dev, struct module *owner,
      |      ^~~~~~~~~~~~~

cc1: all warnings being treated as errors

Caused by commit

3d8785f6c04a ("drm/amdgpu: adding device coredump support")

interacting with commit

77515ebaf019 ("devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm")

from the driver-core tree.

I have applied the following merge resolution patch for today.

From: Stephen Rothwell <[email protected]>
Date: Thu, 23 Jun 2022 15:56:22 +1000
Subject: [PATCH] fix up for "devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm"

interacting with

3d8785f6c04a ("drm/amdgpu: adding device coredump support")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index f2a4c268ac72..9d6418bb963e 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_reset_capture_coredumpm(struct amdgpu_device *adev) · line 4729

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -4723,7 +4723,7 @@ static void amdgpu_reset_capture_coredumpm(struct amdgpu_device *adev)
 	struct drm_device *dev = adev_to_drm(adev);
 
 	ktime_get_ts64(&adev->reset_time);
-	dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
+	dev_coredumpm(dev->dev, THIS_MODULE, adev, 0,
 		      amdgpu_devcoredump_read, amdgpu_devcoredump_free);
 }
 #endif

Ok, this isn't going to work as-is. I'll go revert this patch (and the other one) from my tree and then request this to be done in a way that does not break anyone going forward, if possible...

thanks,

greg k-h

#2 lore raw
In reply to Stephen Rothwell
Quoted 63 lines · Stephen Rothwell

Hi all,

After merging the amdgpu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

In file included from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from include/linux/power_supply.h:15,
from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:28:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function 'amdgpu_reset_capture_coredumpm':
include/linux/gfp.h:337:25: error: passing argument 5 of 'dev_coredumpm' makes pointer from integer without a cast [-Werror=int-conversion]

  337 | #define GFP_KERNEL      (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         unsigned int

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4726:55: note: in expansion of macro 'GFP_KERNEL'
4726 | dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
| ^~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:59:30: note: expected 'ssize_t (*)(char *, loff_t, size_t, void *, size_t)' {aka 'long int (*)(char *, long long int, long unsigned int, void *, long unsigned int)'} but argument is of type 'unsigned int'

   59 |                    ssize_t (*read)(char *buffer, loff_t offset, size_t count,
      |                    ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   60 |                                    void *data, size_t datalen),
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4727:23: error: passing argument 6 of 'dev_coredumpm' from incompatible pointer type [-Werror=incompatible-pointer-types]
 4727 |                       amdgpu_devcoredump_read, amdgpu_devcoredump_free);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       ssize_t (*)(char *, loff_t,  size_t,  void *, size_t) {aka long int (*)(char *, long long int,  long unsigned int,  void *, long unsigned int)}
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:61:27: note: expected 'void (*)(void *)' but argument is of type 'ssize_t (*)(char *, loff_t,  size_t,  void *, size_t)' {aka 'long int (*)(char *, long long int,  long unsigned int,  void *, long unsigned int)'}
   61 |                    void (*free)(void *data));
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4726:9: error: too many arguments to function 'dev_coredumpm'
 4726 |         dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
      |         ^~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:35:
include/linux/devcoredump.h:57:6: note: declared here
   57 | void dev_coredumpm(struct device *dev, struct module *owner,
      |      ^~~~~~~~~~~~~

cc1: all warnings being treated as errors

Caused by commit

3d8785f6c04a ("drm/amdgpu: adding device coredump support")

interacting with commit

77515ebaf019 ("devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm")

from the driver-core tree.

I have applied the following merge resolution patch for today.

From: Stephen Rothwell <[email protected]>
Date: Thu, 23 Jun 2022 15:56:22 +1000
Subject: [PATCH] fix up for "devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm"

Quoted 8 lines

interacting with

3d8785f6c04a ("drm/amdgpu: adding device coredump support")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Sorry for the delay, the driver-core tree has now reverted this, so all should be good.

greg k-h