Created attachment 902288 [details, diff] patch vhba.c to change remove to void for linux 6.11 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/base/platform.c?id=5c5a7680e67ba6fbbb5f4d79fa41485450c1985c "platform: Provide a remove callback that returns no value" https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/base/platform.c?id=0edb555a65d1ef047a9805051c36922b52a38a9d "platform: Make platform_driver::remove() return void" I have created a patch that lets sys-fs/vhba-20240202 compile against linux-6.11-rc6. Patch needs changes for compatibility with older kernels.
modprobe vhba and modprobe -r vhba tested, no problems in dmesg [Sa, 7. Sep 2024, 12:14:01] scsi host8: vhba No message on removal, but module is removed.
(In reply to jospezial from comment #1) > modprobe vhba > and > modprobe -r vhba > tested, no problems in dmesg > [Sa, 7. Sep 2024, 12:14:01] scsi host8: vhba > No message on removal, but module is removed. About to test your patch, as I initially came to report about: /var/tmp/portage/sys-fs/vhba-20240202/work/vhba-module-20240202/vhba.c:1087:15: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Wincompatible-pointer-types] 1087 | .remove = vhba_remove, | ^~~~~~~~~~~ /var/tmp/portage/sys-fs/vhba-20240202/work/vhba-module-20240202/vhba.c:1087:15: note: (near initialization for 'vhba_platform_driver.<anonymous>.remove') make[3]: *** [scripts/Makefile.build:244: /var/tmp/portage/sys-fs/vhba-20240202/work/vhba-module-20240202/vhba.o] Error 1 make[2]: *** [/usr/src/linux-6.11.0-gentoo/Makefile:1926: /var/tmp/portage/sys-fs/vhba-20240202/work/vhba-module-20240202] Error 2 make[1]: *** [Makefile:224: __sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-6.11.0-gentoo' make: *** [Makefile:14: modules] Error 2 * ERROR: sys-fs/vhba-20240202::gentoo failed (compile phase): Didn't bissect source of my issue. Hoping your patch to be in its scope...
Tested working for iso mount in gui userspace. Currently testing if CONFIG_TRIM_UNUSED_KSYMS requires update accordingly...
builds fine here CONFIG_TRIM_UNUSED_KSYMS symbol list unchainged. Currently testing patch compatibility with former kernel version, e.g. 6.10.10...
As expected, patch doesn't survive with previous kernel ;) As far as rmmod is concerned, kernel-6.11.0 freezes here. Previous kernel core dumps here. Maybe this is due to some local specifics here: keyworded gcc-13 here. LDFLAGS="-Wl,-O1 -Wl,-fuse-ld=mold " ================================================================= Package Settings ================================================================= sys-fs/vhba-20240202::gentoo was built with the following: USE="-dist-kernel modules-compress modules-sign strip" ABI_X86="(64)" CFLAGS="-march=native -mtune=native -O2 -flto=1 -fuse-linker-plugin -fno-fat-lto-objects -pipe -Wa,-mbranches-within-32B-boundaries" CXXFLAGS="-march=native -mtune=native -O2 -flto=1 -fuse-linker-plugin -fno-fat-lto-objects -pipe -Wa,-mbranches-within-32B-boundaries"
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e6163f62c9b6b55214ea6881371f11aa2b985f2 commit 4e6163f62c9b6b55214ea6881371f11aa2b985f2 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2024-09-18 04:40:06 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2024-09-18 04:40:24 +0000 sys-fs/vhba: Bump to 20240917 Closes: https://bugs.gentoo.org/939278 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-fs/vhba/Manifest | 1 + sys-fs/vhba/vhba-20240917.ebuild | 58 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+)