Skip to contentSkip to conversation

cobalt/rtdm: Drop unused nop_close

PATCH New Jan Kiszka 1 participant 1 message Sep 6, 2019

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 cobalt/rtdm: Drop unused nop_close

From: Jan Kiszka <[email protected]>

Since 1909729e00dd, the device's close operation is always interposed with __rtdm_dev_close, thus will never be NULL even if the driver provides none. Other callers of rtdm_fd_enter, timerfd and mqueue, also provide close handlers. So drop the default initialization.

---
 kernel/cobalt/rtdm/fd.c | 5 -----
 1 file changed, 5 deletions(-)
kernel/cobalt/rtdm/fd.c +0 -5
index 8a87e22643..d8a62376e6 100644
@@ -56,10 +56,6 @@ static int eadv(void)
 	return -EADV;
 }
 
-static void nop_close(struct rtdm_fd *fd)
-{
-}
-
 static inline struct rtdm_fd_index *
 fetch_fd_index(struct cobalt_ppd *p, int ufd)
 {
@@ -157,7 +153,6 @@ int rtdm_fd_enter(struct rtdm_fd *fd, int ufd, unsigned int magic,
 	assign_default_dual_handlers(ops->sendmsg);
 	assign_invalid_default_handler(ops->select);
 	assign_invalid_default_handler(ops->mmap);
-	__assign_default_handler(ops->close, nop_close);
 
 	ppd = cobalt_ppd_get(0);
 	fd->magic = magic;
Signature · 1 line
2.16.4