Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939278 - sys-fs/vhba - patch to change "remove" from "int" to "void" for kernel 6.11
Summary: sys-fs/vhba - patch to change "remove" from "int" to "void" for kernel 6.11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-09-07 10:47 UTC by jospezial
Modified: 2024-09-18 04:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch vhba.c to change remove to void for linux 6.11 (vhba_remove_int_void.patch,468 bytes, patch)
2024-09-07 10:47 UTC, jospezial
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2024-09-07 10:47:14 UTC
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.
Comment 1 jospezial 2024-09-07 10:55:31 UTC
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.
Comment 2 CaptainBlood 2024-09-15 22:38:38 UTC
(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...
Comment 3 CaptainBlood 2024-09-15 23:26:37 UTC
Tested working for iso mount in gui userspace.
Currently testing if CONFIG_TRIM_UNUSED_KSYMS requires update accordingly...
Comment 4 CaptainBlood 2024-09-15 23:43:20 UTC
builds fine here CONFIG_TRIM_UNUSED_KSYMS symbol list unchainged.
Currently testing patch compatibility with former kernel version, e.g. 6.10.10...
Comment 5 CaptainBlood 2024-09-16 01:01:30 UTC
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"
Comment 6 Larry the Git Cow gentoo-dev 2024-09-18 04:42:37 UTC
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(+)