Page MenuHomeFreeBSD

openzfs/freebsd: Use compiler.h from FreeBSD's base's linuxkpi
ClosedPublic

Authored by imp on Oct 15 2024, 5:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 25, 11:32 PM
Unknown Object (File)
Sun, Jan 25, 6:13 PM
Unknown Object (File)
Sat, Jan 24, 6:29 PM
Unknown Object (File)
Dec 7 2025, 6:43 PM
Unknown Object (File)
Nov 15 2025, 10:32 AM
Unknown Object (File)
Nov 11 2025, 11:34 PM
Unknown Object (File)
Nov 10 2025, 2:18 AM
Unknown Object (File)
Nov 6 2025, 4:25 PM
Subscribers

Details

Summary

The FreeBSD linux/compiler.h in OpenZFS was copied from a very old
version of FreeBSD's linuxkpi's linux/compiler.h. There's no need for
this duplication. Use FreeBSD's linuxkpi version instead, and provide
zfs_fallthrough to augment it (it's all that's needed). Use #pragma once
to avoid naming issues for guard variables. Since this is a complete
rewrite, use my copyright here (the original code in FreeBSD still
credits everybody).

Remove extra copies of macros that were defined elsewhere, but are now
properly defined in LinuxKPI so are redundant.

This is currently pull request #16650 upstream. Committing now to get
wider testing (though it surves Universe well enough for me).

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable