The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=50aa145171bc88edde8cf3b7eb13dbbf88a3f8a7
commit 50aa145171bc88edde8cf3b7eb13dbbf88a3f8a7 Author: Jean-Sébastien Pédron <[email protected]> AuthorDate: 2026-06-12 17:55:34 +0000 Commit: Jean-Sébastien Pédron <[email protected]> CommitDate: 2026-06-20 10:35:37 +0000 linuxkpi: Add 'fd_empty()` The DRM drivers generic code started to use it in Linux 6.13. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57582 --- sys/compat/linuxkpi/common/include/linux/file.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/file.h b/sys/compat/linuxkpi/common/include/linux/file.h index 4d8f8fba7fab..13eecfa6a2b0 100644 --- a/sys/compat/linuxkpi/common/include/linux/file.h +++ b/sys/compat/linuxkpi/common/include/linux/file.h @@ -186,6 +186,12 @@ static inline struct fd fdget(unsigned int fd) #define fd_file(fd) ((fd).linux_file) +static inline bool +fd_empty(struct fd fd) +{ + return (fd_file(fd) == NULL); +} + #define file linux_file #define fget(...) linux_fget(__VA_ARGS__)
