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
F152524611: D36764.diff
Wed, Apr 15, 12:00 PM
F152476266: D36764.diff
Wed, Apr 15, 4:57 AM
Unknown Object (File)
Mon, Apr 13, 6:47 PM
Unknown Object (File)
Sun, Apr 12, 12:08 AM
Unknown Object (File)
Wed, Apr 8, 10:00 PM
Unknown Object (File)
Mon, Apr 6, 5:03 PM
Unknown Object (File)
Mon, Apr 6, 11:37 AM
Unknown Object (File)
Sat, Apr 4, 3:54 AM
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.