Page MenuHomeFreeBSD

linuxkpi: Add devm_add_action and devm_add_action_or_reset
ClosedPublic

Authored by manu on Mar 17 2023, 10:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 22, 10:25 AM
Unknown Object (File)
Oct 21 2024, 11:01 AM
Unknown Object (File)
Sep 21 2024, 4:26 PM
Unknown Object (File)
Sep 19 2024, 11:08 PM
Unknown Object (File)
Sep 7 2024, 11:48 AM
Unknown Object (File)
Sep 5 2024, 7:01 AM
Unknown Object (File)
Sep 2 2024, 5:12 AM
Unknown Object (File)
Sep 1 2024, 5:06 AM

Details

Summary

Those adds a new devres and will exectute some function on release.

Sponsored by: Beckhoff Automation GmbH & Co. KG

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

manu requested review of this revision.Mar 17 2023, 10:22 AM
bz added a subscriber: bz.

Feel free to implement the changes before commit they make sense to you.

sys/compat/linuxkpi/common/include/linux/device.h
683

Do we have to #define to something else? Wy can we not use the names as they should be?

sys/compat/linuxkpi/common/src/linux_devres.c
246

Should we check that action is non-NULL to avoid calling a possible NULL pointer on release?

This revision is now accepted and ready to land.Mar 17 2023, 9:17 PM
sys/compat/linuxkpi/common/include/linux/device.h
683

That's what we did from the beginning for linuxkpi, prefix all the stuff just in case we add a native symbol that is the same in the kernel.

sys/compat/linuxkpi/common/src/linux_devres.c
246

Doesn't seems that Linux does this, it wouldn't hurt to add a check, just wondering what errno we should return then

sys/compat/linuxkpi/common/src/linux_devres.c
246

-EINVAL? or add a KASSERT instead?

sys/compat/linuxkpi/common/src/linux_devres.c
246

I'll do the KASSERT

This revision now requires review to proceed.Mar 22 2023, 7:50 AM
manu marked an inline comment as done.Mar 22 2023, 7:51 AM
This revision is now accepted and ready to land.Mar 22 2023, 1:47 PM