Page MenuHomeFreeBSD

rangests: use PCTRIE_DEFINE
ClosedPublic

Authored by dougm on Aug 9 2023, 4:44 AM.
Tags
None
Referenced Files
F87602391: D41391.diff
Fri, Jul 5, 5:08 PM
Unknown Object (File)
May 1 2024, 11:34 PM
Unknown Object (File)
May 1 2024, 11:32 PM
Unknown Object (File)
May 1 2024, 11:31 PM
Unknown Object (File)
May 1 2024, 8:18 PM
Unknown Object (File)
Dec 20 2023, 7:46 AM
Unknown Object (File)
Sep 5 2023, 11:23 PM
Unknown Object (File)
Sep 2 2023, 12:33 PM
Subscribers

Details

Summary

subr_rangeset.c is the only source file that calls functions like pctrie_insert and pctrie_remove directly; other users of pctries use the PCTRIE_DEFINE macro to define interfaces to pctrie that let them ignore issues of offsets within structs and uint64_t return values.

Change subr_rangeset.c to use PCTRIE_DEFINE too. And change pctrie.h to mark the lookup function as unused, to avoid warnings when compiling files, like subr_rangeset.c, that don't invoke lookup().

Test Plan

I can compile and boot a kernel. I don't know that I've actually tested rangesets in doing that, though.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Aug 9 2023, 4:44 AM
dougm created this revision.

You need a CPU with PKRU feature to use this.

sys/kern/subr_rangeset.c
77

One blank line is enough.

This revision is now accepted and ready to land.Aug 9 2023, 7:24 AM
This revision was automatically updated to reflect the committed changes.