OFS / linux-dfl-backport

Backport version of the linux-dfl (Device Feature List) kernel driver for FPGA devices. This is an out-of-tree driver, designed to be built, packaged, and installed as a stand-alone set of driver modules.
GNU General Public License v2.0
3 stars 11 forks source link

huge_mm.h:265:24: error: field 'kobj' has incomplete type #133

Closed pcolberg closed 3 months ago

pcolberg commented 3 months ago

Latest Fedora rawhide kernel 6.11.0-0.rc2.20240809gitee9a43b7cfe2.27.fc41.x86_64 fails to build:

2024-08-12T18:43:25.7187809Z make[1]: Entering directory '/usr/src/kernels/6.11.0-0.rc2.20240809gitee9a43b7cfe2.27.fc41.x86_64'
2024-08-12T18:43:26.1897824Z   CC [M]  /__w/linux-dfl-backport/linux-dfl-backport/drivers/fpga/fpga-mgr.o
2024-08-12T18:43:26.5148621Z In file included from ./include/linux/mm.h:1127,
2024-08-12T18:43:26.5150144Z                  from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/mm.h:14,
2024-08-12T18:43:26.5151824Z                  from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/sysfs.h:7,
2024-08-12T18:43:26.5152918Z                  from ./include/linux/kobject.h:20,
2024-08-12T18:43:26.5153795Z                  from ./include/linux/energy_model.h:7,
2024-08-12T18:43:26.5155133Z                  from ./include/linux/device.h:16,
2024-08-12T18:43:26.5156377Z                  from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/device.h:7,
2024-08-12T18:43:26.5157676Z                  from ./include/linux/platform_device.h:13,
2024-08-12T18:43:26.5159047Z                  from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/fpga/fpga-mgr.h:12,
2024-08-12T18:43:26.5160570Z                  from /__w/linux-dfl-backport/linux-dfl-backport/drivers/fpga/fpga-mgr.c:12:
2024-08-12T18:43:26.5162216Z ./include/linux/huge_mm.h:265:24: error: field 'kobj' has incomplete type
2024-08-12T18:43:26.5163281Z   265 |         struct kobject kobj;
2024-08-12T18:43:26.5163942Z       |                        ^~~~
2024-08-12T18:43:26.5959079Z make[3]: *** [scripts/Makefile.build:244: /__w/linux-dfl-backport/linux-dfl-backport/drivers/fpga/fpga-mgr.o] Error 1
2024-08-12T18:43:26.5961308Z make[2]: *** [/usr/src/kernels/6.11.0-0.rc2.20240809gitee9a43b7cfe2.27.fc41.x86_64/Makefile:1943: /__w/linux-dfl-backport/linux-dfl-backport] Error 2
2024-08-12T18:43:26.5963671Z make[1]: *** [Makefile:236: __sub-make] Error 2
2024-08-12T18:43:26.5965025Z make[1]: Leaving directory '/usr/src/kernels/6.11.0-0.rc2.20240809gitee9a43b7cfe2.27.fc41.x86_64'
2024-08-12T18:43:26.5965929Z make: *** [Makefile:164: all] Error 2
pcolberg commented 3 months ago

struct kobject kobj is a member of struct thpsize, which was moved from mm/huge_memory.c to include/linux/huge_mm.h in commit 4b98995530b7 ("mm: shmem: add multi-size THP sysfs interface for anonymous shmem").