Page MenuHomeFreeBSD

linuxkpi: Add `BIN_ATTR*()` macros
ClosedPublic

Authored by dumbbell on Mar 15 2025, 11:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 6, 3:27 AM
Unknown Object (File)
Sun, Sep 21, 6:59 PM
Unknown Object (File)
Fri, Sep 19, 4:28 PM
Unknown Object (File)
Fri, Sep 19, 3:14 AM
Unknown Object (File)
Sep 13 2025, 9:03 PM
Unknown Object (File)
Sep 5 2025, 6:19 AM
Unknown Object (File)
Aug 26 2025, 3:02 AM
Unknown Object (File)
Aug 4 2025, 11:23 PM
Subscribers

Details

Summary

They are helpers to declare static struct bin_attribute.

The amdgpu DRM driver started to use them for some time but the code was commented out (and this is still the case as of this commit). In Linux 6.8, it declared a new BIN_ATTR. This new code is not commented out.

While here, change the first argument of the read and write callbacks to be a struct linux_file * instead of a struct file *. This ensures the right structure is being referenced at compile time.

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

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

bz added a subscriber: bz.

I still know little about sysfs but it seems fine.

This revision is now accepted and ready to land.Apr 1 2025, 11:13 PM
This revision was automatically updated to reflect the committed changes.