In some cases, remove casts by changing callout functions to accept
a void * argument and adding an assignment to a pointer of the desired
type. In other cases, expand the typedef.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 27844 Build 26021: arc lint + arc unit
Event Timeline
Comment Actions
I do not object, but what is wrong with the typedef itself ? It is in fact useful, since you have to spell the function pointer type explicitly more than once, esp. in casts.
Comment Actions
The typedef itself is for the old API that I'm planning to remove. It's name doesn't make much sense for callout_*(). We could perhaps define a new callout_handler_t or some such in callout.h, but it's not clear to me that would really be better. The only casts here are 2 in uart_core.c. I don't mind renaming the typedef and keeping it for the uart casts (and using it in callout.h and a few other places in follow-on patches), but I don't think the timeout_t name or systm.h header are the right ones going forward.