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)
Wed, Dec 24, 12:44 PM
Unknown Object (File)
Wed, Dec 24, 12:18 PM
Unknown Object (File)
Dec 4 2025, 2:37 AM
Unknown Object (File)
Nov 30 2025, 9:52 PM
Unknown Object (File)
Nov 30 2025, 5:01 PM
Unknown Object (File)
Nov 14 2025, 5:32 AM
Unknown Object (File)
Nov 7 2025, 4:35 AM
Unknown Object (File)
Nov 5 2025, 11:35 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.