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)
Mon, Jul 7, 1:19 AM
Unknown Object (File)
Sun, Jul 6, 6:02 PM
Unknown Object (File)
Sun, Jul 6, 3:16 AM
Unknown Object (File)
Sun, Jul 6, 12:30 AM
Unknown Object (File)
Sat, Jul 5, 2:34 AM
Unknown Object (File)
Tue, Jul 1, 9:51 PM
Unknown Object (File)
Tue, Jun 24, 3:52 PM
Unknown Object (File)
Mon, Jun 23, 2:02 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.