The branch main has been updated by hselasky:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=67807f5066a012254da9a4535c0f225377afb66d

commit 67807f5066a012254da9a4535c0f225377afb66d
Author:     Hans Petter Selasky <[email protected]>
AuthorDate: 2021-05-11 18:51:35 +0000
Commit:     Hans Petter Selasky <[email protected]>
CommitDate: 2021-05-11 19:00:23 +0000

    cdev_del() should only put it's kernel object in the LinuxKPI.
    
    The destructor takes care of the rest.
    
    MFC after:      1 week
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
---
 sys/compat/linuxkpi/common/include/linux/cdev.h | 4 ----
 sys/compat/linuxkpi/common/src/linux_compat.c   | 3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/cdev.h 
b/sys/compat/linuxkpi/common/include/linux/cdev.h
index 2a472da91866..bdfb7e76c9a7 100644
--- a/sys/compat/linuxkpi/common/include/linux/cdev.h
+++ b/sys/compat/linuxkpi/common/include/linux/cdev.h
@@ -135,13 +135,9 @@ cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t 
uid, gid_t gid, int mode)
        return (0);
 }
 
-void linux_destroy_dev(struct linux_cdev *);
-
 static inline void
 cdev_del(struct linux_cdev *cdev)
 {
-
-       linux_destroy_dev(cdev);
        kobject_put(&cdev->kobj);
 }
 
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c 
b/sys/compat/linuxkpi/common/src/linux_compat.c
index ee41e5e2b30d..dcbbc3a80b8a 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -115,6 +115,7 @@ MALLOC_DEFINE(M_KMALLOC, "linux", "Linux kmalloc compat");
 #undef cdev
 #define        RB_ROOT(head)   (head)->rbh_root
 
+static void linux_destroy_dev(struct linux_cdev *);
 static void linux_cdev_deref(struct linux_cdev *ldev);
 static struct vm_area_struct *linux_cdev_handle_find(void *handle);
 
@@ -2243,7 +2244,7 @@ linux_cdev_static_release(struct kobject *kobj)
        kobject_put(kobj->parent);
 }
 
-void
+static void
 linux_destroy_dev(struct linux_cdev *ldev)
 {
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to