git: 373871696d3d - main - linuxkpi: Define `fd_file()`
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Apr 2026 18:10:20 UTC
The branch main has been updated by dumbbell:
URL: https://cgit.FreeBSD.org/src/commit/?id=373871696d3da5f9fe1dcd23c83be95dbaa1b41d
commit 373871696d3da5f9fe1dcd23c83be95dbaa1b41d
Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2026-04-11 15:18:06 +0000
Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2026-04-22 18:09:53 +0000
linuxkpi: Define `fd_file()`
This macro simply returns the `file` field of the `struct fd`.
The DRM generic code and the amdgpu driver started to use it in
Linux 6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56440
---
sys/compat/linuxkpi/common/include/linux/file.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/file.h b/sys/compat/linuxkpi/common/include/linux/file.h
index be12d5f1bccf..4d8f8fba7fab 100644
--- a/sys/compat/linuxkpi/common/include/linux/file.h
+++ b/sys/compat/linuxkpi/common/include/linux/file.h
@@ -184,6 +184,8 @@ static inline struct fd fdget(unsigned int fd)
return (struct fd){f};
}
+#define fd_file(fd) ((fd).linux_file)
+
#define file linux_file
#define fget(...) linux_fget(__VA_ARGS__)