-
Notifications
You must be signed in to change notification settings - Fork 1.9k
spa: fix signature mismatch for spa_boot_init as eventhandler required #17088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fb2c2cd
to
9eacc1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally the direction is right, just compilers don't appreciate it:
module/zfs/spa_misc.c:2552:21: error: unused parameter 'dummy' [-Werror,-Wunused-parameter]
2552 | spa_boot_init(void *dummy)
| ^
Probably needs __unused
.
Emm, I actually add __unused before I force-push it. Here is the Github Action log. Don't have any idea what happens. |
@aokblast I am not sure where have you pushed it, but I don't see it in the only commit of the branch: aokblast@9eacc1e or master...aokblast:zfs:fix_spa_sig . How about figuring it out and force pushing it again? |
I modified it and you may see the compile error. I think it is because the __unused is not defined and it is defined in <sys/cdefs.h>. Should I include it? I assume that all kernel .c file include it. Also it compiles without error in zfs in FreeBSD base. |
@aokblast - You can explicitly mark parameter as unused like this, same way it's already done in other places:
Also, it would be nice if you can push your patch in a single commit. |
69afcfa
to
fdf33ed
Compare
Oh, thank you! |
Signed-off-by: SHENGYI HONG <[email protected]>
fdf33ed
to
c5db455
Compare
Reviewed-by: Ameer Hamza <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: SHENGYI HONG <[email protected]> Closes openzfs#17088
Reviewed-by: Ameer Hamza <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: SHENGYI HONG <[email protected]> Closes openzfs#17088
Reviewed-by: Ameer Hamza <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: SHENGYI HONG <[email protected]> Closes openzfs#17088
Reviewed-by: Ameer Hamza <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: SHENGYI HONG <[email protected]> Closes openzfs#17088
Motivation and Context
I am working on KCFI for FreeBSD. As KCFI required all function signature matched.
We should have this patch for changing signature.
Types of changes
Checklist:
Signed-off-by
.