Page MenuHomeFreeBSD

acpi_spmc(4): acpi_spmc_run_dsm(): Rename, rename parameters, constify
ClosedPublic

Authored by olce on Thu, May 7, 8:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 21, 11:29 AM
Unknown Object (File)
Thu, May 21, 4:06 AM
Unknown Object (File)
Thu, May 21, 1:25 AM
Unknown Object (File)
Wed, May 20, 6:43 AM
Unknown Object (File)
Tue, May 19, 1:19 AM
Unknown Object (File)
Sun, May 17, 3:43 PM
Unknown Object (File)
Sun, May 17, 5:11 AM
Unknown Object (File)
Sun, May 17, 2:10 AM
Subscribers

Details

Summary

This function actually runs a function of a given DSM. Remove the
'_dsm' suffix to remove the inaccuracy and make things simpler.

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

olce requested review of this revision.Thu, May 7, 8:17 PM

not sure I like how generic the function name acpi_spmc_run() is. Technically it is actually running a DSM, just with a bunch of other options so the AML interpreter knows how to dispatch the function. How about acpI_spmc_run_dsm_fn() or something like that?

not sure I like how generic the function name acpi_spmc_run() is. Technically it is actually running a DSM, just with a bunch of other options so the AML interpreter knows how to dispatch the function. How about acpI_spmc_run_dsm_fn() or something like that?

acpi_spmc_run_dsm_fn() could work, although maybe _fn() at the end could be slightly misleading (that is often used for callbacks), maybe _func() instead.

I do not have strong feelings, it's just that I find acpi_spmc_run() much simpler and not really ambiguous in that context (what could acpi_spmc(4) run except a DSM function?).

I do not have strong feelings, it's just that I find acpi_spmc_run() much simpler and not really ambiguous in that context (what could acpi_spmc(4) run except a DSM function?).

Also, reading the points of call, what this function does seems pretty clear, since we have names (preprocessor constants) for each function.

I do not have strong feelings, it's just that I find acpi_spmc_run() much simpler and not really ambiguous in that context (what could acpi_spmc(4) run except a DSM function?).

i mean from my pov I agree with you, but if I was new to this code and was reading it for the first time I feel like this might confuse me

Also, reading the points of call, what this function does seems pretty clear, since we have names (preprocessor constants) for each function.

that is true

i mean from my pov I agree with you, but if I was new to this code and was reading it for the first time I feel like this might confuse me

Yes, I was thinking also about that in the meantime. I'll add a comment before acpi_spmc_run(), that should be enough.

i mean from my pov I agree with you, but if I was new to this code and was reading it for the first time I feel like this might confuse me

Yes, I was thinking also about that in the meantime. I'll add a comment before acpi_spmc_run(), that should be enough.

okay, happy with that

Add an herald comment before acpi_spmc_run_dsm().

This revision is now accepted and ready to land.Tue, May 12, 2:14 PM