Page MenuHomeFreeBSD

virtio: use bool for boolean functions
ClosedPublic

Authored by freebsd_igalic.co on Sep 13 2023, 10:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 10:21 AM
Unknown Object (File)
Sun, Jun 23, 6:51 PM
Unknown Object (File)
Thu, Jun 20, 9:14 AM
Unknown Object (File)
Tue, Jun 18, 12:15 PM
Unknown Object (File)
Thu, Jun 6, 8:49 AM
Unknown Object (File)
Mar 13 2024, 6:34 PM
Unknown Object (File)
Jan 31 2024, 9:38 AM
Unknown Object (File)
Jan 30 2024, 2:47 AM
Subscribers

Details

Summary

these static functions:

  • vq_ring_use_indirect

and these public functions:

  • virtio_bus_is_modern
  • virtio_with_feature
  • virtqueue_empty
  • virtqueue_full

exclusively return a boolean value.
Change their return values to bool.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 53575
Build 50466: arc lint + arc unit

Event Timeline

cognet added inline comments.
sys/dev/virtio/pci/virtio_pci_legacy.c
90

Hmm those int arguments, disappearing from the virtqueues method, should probably not be removed in that commit :)

sys/dev/virtio/pci/virtio_pci_modern.c
115

ditto

sys/dev/virtio/pci/virtio_pci_legacy.c
90

thanks for catching that.
looks like a botched rebase

thanks to @cognet for helping catch this rebase fuckup.

This revision is now accepted and ready to land.Sep 15 2023, 3:45 AM
This revision was automatically updated to reflect the committed changes.

I reckon this commit can easily be MFC'd without causing too much breakage