Page MenuHomeFreeBSD

linuxkpi: Split <linux/compiler.h>
ClosedPublic

Authored by dumbbell on Sun, Jan 4, 10:25 AM.
Tags
None
Referenced Files
F141806920: D54495.diff
Sat, Jan 10, 4:45 PM
Unknown Object (File)
Sat, Jan 10, 4:23 PM
Unknown Object (File)
Sat, Jan 10, 3:52 PM
Unknown Object (File)
Sat, Jan 10, 5:00 AM
Unknown Object (File)
Fri, Jan 9, 6:41 AM
Unknown Object (File)
Fri, Jan 9, 5:19 AM
Unknown Object (File)
Fri, Jan 9, 2:06 AM
Unknown Object (File)
Thu, Jan 8, 10:31 PM
Subscribers

Details

Summary

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.

This is part of the update of DRM drivers to Linux 6.10.

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Mon, Jan 5, 5:05 PM
This revision was automatically updated to reflect the committed changes.
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/compiler.h
36

What is the reason not to include them as <linux/compiler_types.h> here and in the other file if that is an official Linux[KPI] include file?

sys/compat/linuxkpi/common/include/linux/compiler.h
36

Mmm, probably should be