Page MenuHomeFreeBSD

linuxkpi: Define `__ATTR_RO_MODE()` and `__ATTR_RW_MODE()`
ClosedPublic

Authored by dumbbell on Jun 14 2026, 9:14 AM.
Tags
None
Referenced Files
F165267526: D57574.diff
Fri, Aug 7, 7:19 AM
F165255137: D57574.id180139.diff
Fri, Aug 7, 5:15 AM
F165247375: D57574.diff
Fri, Aug 7, 3:56 AM
Unknown Object (File)
Mon, Aug 3, 12:25 AM
Unknown Object (File)
Sun, Aug 2, 5:05 AM
Unknown Object (File)
Sun, Aug 2, 3:49 AM
Unknown Object (File)
Sat, Aug 1, 6:25 AM
Unknown Object (File)
Fri, Jul 31, 6:10 AM
Subscribers

Details

Summary

They are the same as their __ATTR_RO() and _ATTR_RW() equivalents but they take the file mode as an extra argument.

We now use these new macros to redefine __ATTR_RO() and __ATTR_RW() on top of them.

The amdgpu DRM driver started to use __ATTR_RW_MODE() in Linux 6.13.

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

Sponsored by: The FreeBSD Foundation

Diff Detail

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