[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
- [PATCH 02/66] i386/i386/setjmp.h: remove ifdef, (continued)
- [PATCH 04/66] ddb/db_command.c: remove forward declaration, Marin Ramesa, 2013/12/05
- [PATCH 05/66] ddb/db_command.h: remove duplicate variable declaration, Marin Ramesa, 2013/12/05
- [PATCH 07/66] ddb/db_output.c: remove duplicate function, Marin Ramesa, 2013/12/05
- [PATCH 06/66] ddb/db_output.c: remove call to nonexistent db_printf_enter(), Marin Ramesa, 2013/12/05
- [PATCH 08/66] ddb/db_output.h: add comment, Marin Ramesa, 2013/12/05
- [PATCH 09/66] device/blkio.c: remove function,
Marin Ramesa <=
- [PATCH 10/66] device/chario.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 11/66] device/cirbuf.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 12/66] device/cons.h: remove ifdef, Marin Ramesa, 2013/12/05
- [PATCH 14/66] device/if_ether.h: remove unused variable, Marin Ramesa, 2013/12/05
- [PATCH 13/66] device/dev_lookup.c: remove unused lock, Marin Ramesa, 2013/12/05
- [PATCH 15/66] device/if_ether.h: remove ifdef, Marin Ramesa, 2013/12/05
- [PATCH 16/66] device/kmsg.c: use boolean instead of an int, Marin Ramesa, 2013/12/05