Page MenuHomeFreeBSD

rangests: use PCTRIE_DEFINE
ClosedPublic

Authored by dougm on Aug 9 2023, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 1, 5:01 PM
Unknown Object (File)
Sun, Sep 22, 5:27 PM
Unknown Object (File)
Fri, Sep 20, 11:54 PM
Unknown Object (File)
Sun, Sep 8, 8:56 PM
Unknown Object (File)
Sep 7 2024, 7:26 AM
Unknown Object (File)
Aug 13 2024, 12:49 AM
Unknown Object (File)
Jul 8 2024, 8:34 PM
Unknown Object (File)
Jul 5 2024, 5:08 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.