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
backport: fix incomplete type kobject due to circular header dependency #134
struct thpsize, which includes a member struct kobject kobj, 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").
If include/linux/mm.h is included from include/linux/sysfs.h, this causes struct kobject to be incomplete when include/linux/huge_mm.h is parsed.
make[1]: Entering directory '/usr/src/kernels/6.11.0-0.rc2.20240809gitee9a43b7cfe2.27.fc41.x86_64'
CC [M] /__w/linux-dfl-backport/linux-dfl-backport/drivers/fpga/fpga-mgr.o
In file included from ./include/linux/mm.h:1127,
from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/mm.h:14,
from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/sysfs.h:7,
from ./include/linux/kobject.h:20,
from ./include/linux/energy_model.h:7,
from ./include/linux/device.h:16,
from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/device.h:7,
from ./include/linux/platform_device.h:13,
from /__w/linux-dfl-backport/linux-dfl-backport/include/linux/fpga/fpga-mgr.h:12,
from /__w/linux-dfl-backport/linux-dfl-backport/drivers/fpga/fpga-mgr.c:12:
./include/linux/huge_mm.h:265:24: error: field 'kobj' has incomplete type
265 | struct kobject kobj;
| ^~~~
struct thpsize, which includes a member struct kobject kobj, 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").
If include/linux/mm.h is included from include/linux/sysfs.h, this causes struct kobject to be incomplete when include/linux/huge_mm.h is parsed.