aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h
Commit message (Collapse)AuthorAgeFilesLines
* sys/cdefs.h: Introduce __maybe_unused attributeHans Rosenfeld14 days1-1/+0
| | | | | | | | | | The __maybe_unused attribute should be used for variables which may or may not be used, such as when their only use is in an assertion. This attribute is functionally identical to __unused, suppressing compiler warnings for particular variable if it remains unused. Reviewed by: Minsoo Choo <minsoo@minsoo.io>, imp Differential Revision: https://reviews.freebsd.org/D56517
* linuxkpi: Split <linux/compiler.h>Jean-Sébastien Pédron2026-01-051-0/+49
On Linux, they split the content into three headers: 1. <linux/compiler.h> 2. <linux/compiler_types.h> 3. <linux/compiler_attributes.h> The first includes the second, which includes the third. <linux/compiler_types.h> is also included on the compiler command line by default! I added that to the compilation flags of the DRM drivers. This allowed me to drop at least one: #ifdef __FreeBSD #include <linux/compiler.h> #endif Note that our copy of <linux/compiler.h> contains definitions which are not defined by Linux' <linux/compiler.h>. I left them alone. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54495