HomeFreeBSD

kldxref: Refactor PNP entry parsing, no functional change

Description

kldxref: Refactor PNP entry parsing, no functional change

  • Add a free_pnp_list to complement parse_pnp_list. Add freeing of 'new_desc' which was previously leaked.
  • Move body of loop that checked a single pnp list element against a table entry into a parse_pnp_entry function to reduce indentation and split parse_entry into a smaller function.
  • Similarly, split out a record_pnp_info function from parse_entry which builds the pnp_list and walks a table.

Reviewed by: imp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D42965

(cherry picked from commit c40fa3dc98d3cd8c39605c19c9cc08026d8e72c9)

Details

Provenance
jhbAuthored on Dec 12 2023, 11:30 PM
Reviewer
imp
Differential Revision
D42965: kldxref: Refactor PNP entry parsing, no functional change
Parents
rG17244789c2fd: cr_bsd_visible(): Style fixes
Branches
Unknown
Tags
Unknown