bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 09/66] device/blkio.c: remove function


From: Marin Ramesa
Subject: [PATCH 09/66] device/blkio.c: remove function
Date: Thu, 5 Dec 2013 22:03:03 +0100

Function block_io_mmap() is never a dev op, therefore it is 
unused and it can be written again easily if needed. I suggest
a removal of this function.

* device/blkio.c (block_io_mmap): Remove function.
* device/dev_pager.c (block_io_mmap): Remove forward declaration.
Remove the code in the case block_io_mmap() is an dev op.

---
 device/blkio.c     | 9 ---------
 device/dev_pager.c | 9 +--------
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/device/blkio.c b/device/blkio.c
index 939067d..00d6f11 100644
--- a/device/blkio.c
+++ b/device/blkio.c
@@ -98,12 +98,3 @@ void minphys(ior)
             ior->io_count = MAX_PHYS;
 }
 
-/*
- * Dummy routine placed in device switch entries to indicate that
- * block device may be mapped.
- */
-vm_offset_t block_io_mmap()
-{
-       return (0);
-}
-
diff --git a/device/dev_pager.c b/device/dev_pager.c
index 1a60045..10d0211 100644
--- a/device/dev_pager.c
+++ b/device/dev_pager.c
@@ -56,9 +56,6 @@
 #include <device/io_req.h>
 #include <device/memory_object_reply.user.h>
 
-extern vm_offset_t     block_io_mmap();        /* dummy routine to allow
-                                                  mmap for block devices */
-
 /*
  *     The device pager routines are called directly from the message
  *     system (via mach_msg), and thus run in the kernel-internal
@@ -290,11 +287,7 @@ kern_return_t      device_pager_setup(
        mach_device_reference(device);
        d->prot = prot;
        d->size = round_page(size);
-       if (device->dev_ops->d_mmap == block_io_mmap) {
-               d->type = DEV_PAGER_TYPE;
-       } else {
-               d->type = CHAR_PAGER_TYPE;
-       }
+       d->type = CHAR_PAGER_TYPE;
 
        dev_pager_hash_insert(d->pager, d);
        dev_pager_hash_insert((ipc_port_t)device, d);   /* HACK */
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]