Page MenuHomeFreeBSD

sys: add uses of driver_filter_t where appropriate
Needs ReviewPublic

Authored by ehem_freebsd_m5p.com on Oct 7 2021, 12:19 AM.

Details

Reviewers
shurd
mhorne
kbowling
Group Reviewers
iflib
Summary

These declaractions need to match driver_filter_t. While there are
plenty of other spots where driver_filter_t would be appropriate, these
seem to have distinct value.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 41994
Build 38882: arc lint + arc unit

Event Timeline

Simply chasing down some instances where device interrupt filters really should have been using driver_filter_t and weren't. Rather distinct sort of cleanup. I'm unsure of reviewers for this...

mhorne added a reviewer: kbowling.
mhorne added a subscriber: mhorne.

Seems fine to me. Is this exhaustive or is it just the drivers you encountered?

We don't generally require the typedefs to be used for prototypes. For example, very few device driver "normal" interrupt handlers use driver_intr_t. There is some mix in the tree of using the typedefs for cdevsw methods (some drivers use the typedefs, some use "plain" prototypes). However, for most of the new-bus related functions typedefs are fairly rare in prototypes.

These are merely some of the ones I've identified. Notably these were ones where this seemed the right approach, as others would need more adjustment to make them consistent.

I've got a patch with the rest of the list. There are around 3-5x this batch for the full list. I could merge that into D32345, or I could create Phabricator entry for those. The majority are various NICs, but there are a few non-NICs and a some architecture functions.

A few functions implicitly marked global stood out as being likely to be redeclared static.