Page MenuHomeFreeBSD

usb: musb_otg_allwinner: de-constify bus_space_tags
ClosedPublic

Authored by kevans on Sep 27 2022, 7:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:42 AM
Unknown Object (File)
Jan 3 2023, 12:17 AM
Unknown Object (File)
Dec 15 2022, 8:01 PM
Subscribers

Details

Summary

The SAN interceptors simply take a bus_space_tag_t, so we're
dropping qualifiers. I don't see any particularly reason the
interceptors couldn't take a const bus_space_t, other than the fact
that I can't figure out how to make that change.

Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.

Diff Detail

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

Event Timeline

Seems harmless to me.

other than the fact that I can't figure out how to make that change.

Does it not work because bus_space_tag_t is a pointer on some platforms but not others?

This revision is now accepted and ready to land.Sep 27 2022, 7:54 PM

Seems harmless to me.

other than the fact that I can't figure out how to make that change.

Does it not work because bus_space_tag_t is a pointer on some platforms but not others?

I asked twitter because I just completely failed to understand; const bus_space_tag_t is naturally equivalent to struct bus_space * const rather than const struct bus_space *, which makes sense but I reckon means we couldn't make a useful change in the interceptors without blowing away that abstraction.

This revision was automatically updated to reflect the committed changes.