PSA: weird type changes in bus-related Banjo APIs

18 views
Skip to first unread message

P.Y. Laligand

unread,
Feb 3, 2021, 5:28:33 PM2/3/21
to drive...@fuchsia.dev
Hi there,

In https://fuchsia-review.googlesource.com/c/fuchsia/+/480400 I changed a few parameter types in some quite common Banjo APIs. For example, in fuchsia.hardware.platform.bus.PBus#CompositeDeviceAdd, the ddk.driver.DeviceFragment parameter became... a uint64. As a consequence, you'll see a few places where a reinterpret_cast<uint64_t> is used on a parameter in a Banjo method call. This will look weird, but it works!

The reason we are doing this is that the original types are blocking the deprecation of Banjo for a variety of reasons, and we are taking the path of least resistance to unblock this effort (see the comments in the CL above for an overview of the alternatives).

Please let me know if you have any questions.

=py=
Reply all
Reply to author
Forward
0 new messages