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