[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/29] device/cirbuf.c (cb_alloc): use vm_size_t instead of an in
From: |
Marin Ramesa |
Subject: |
[PATCH 10/29] device/cirbuf.c (cb_alloc): use vm_size_t instead of an int |
Date: |
Mon, 9 Dec 2013 23:57:25 +0100 |
This is more in line with the call to kalloc() in cb_alloc().
* device/chario.c (tty_inq_size, tty_outq_size): Use unsigned int instead if an
int.
* device/cirbuf.c (cb_alloc) (buf_size): Use vm_size_t instead of an int.
* device/cirbuf.h (cb_alloc) (buf_size): Likewise.
---
device/chario.c | 6 +++---
device/cirbuf.c | 2 +-
device/cirbuf.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/device/chario.c b/device/chario.c
index 2e38248..4b7522f 100644
--- a/device/chario.c
+++ b/device/chario.c
@@ -80,9 +80,9 @@ struct ldisc_switch linesw[] = {
/*
* Sizes for input and output circular buffers.
*/
-const int tty_inq_size = 4096; /* big nuf */
-const int tty_outq_size = 2048; /* Must be bigger that tthiwat */
-boolean_t pdma_default = TRUE; /* turn pseudo dma on by default */
+const unsigned int tty_inq_size = 4096; /* big nuf */
+const unsigned int tty_outq_size = 2048; /* Must be bigger that tthiwat
*/
+boolean_t pdma_default = TRUE; /* turn pseudo dma on by
default */
/*
* compute pseudo-dma tables
diff --git a/device/cirbuf.c b/device/cirbuf.c
index 491e89c..374af34 100644
--- a/device/cirbuf.c
+++ b/device/cirbuf.c
@@ -270,7 +270,7 @@ void cb_clear(struct cirbuf *cb)
void
cb_alloc(
struct cirbuf *cb,
- int buf_size)
+ vm_size_t buf_size)
{
char *buf;
diff --git a/device/cirbuf.h b/device/cirbuf.h
index 5e4360b..64771ce 100644
--- a/device/cirbuf.h
+++ b/device/cirbuf.h
@@ -55,7 +55,7 @@ extern int b_to_q(char *, int, struct cirbuf *);
extern void ndflush(struct cirbuf *, int);
extern void cb_clear(struct cirbuf *);
-extern void cb_alloc(struct cirbuf *, int);
+extern void cb_alloc(struct cirbuf *, vm_size_t);
extern void cb_free(struct cirbuf *);
#endif /* _DEVICE_CIRBUF_H_ */
--
1.8.1.4
- Re: [PATCH 05/29] device/blkio.c (block_io): check if io_count is larger or equal to zero, (continued)
[PATCH 03/29] i386/i386/db_interface.c: use vm_offset_t instead of an unsigned int, Marin Ramesa, 2013/12/09
[PATCH 06/29] device/chario.c (char_write): check if io_count is larger or equal to zero and cast it to vm_size_t, Marin Ramesa, 2013/12/09
[PATCH 07/29] device/chario.c (char_read): check if io_count is larger or equal to zero, Marin Ramesa, 2013/12/09
[PATCH 08/29] device/chario.c: trivial stylistic fix for consistency, Marin Ramesa, 2013/12/09
[PATCH 09/29] device/cirbuf.c (getc): use char instead of an unsigned char, Marin Ramesa, 2013/12/09
[PATCH 10/29] device/cirbuf.c (cb_alloc): use vm_size_t instead of an int,
Marin Ramesa <=
[PATCH 11/29] device/cirbuf.c (cb_free): use vm_size_t instead of an int, Marin Ramesa, 2013/12/09
[PATCH 12/29] device/cons.c: fix argument list, Marin Ramesa, 2013/12/09
[PATCH 13/29] device/dev_pager.c (device_pager_data_request): remove forward declaration, Marin Ramesa, 2013/12/09
[PATCH 14/29] device/dev_pager.c (device_pager_data_request): cast to (void *) instead to (char *), Marin Ramesa, 2013/12/09
[PATCH 15/29] device/dev_pager.c (device_pager_data_request_done): check if io_count is larger or equal to zero and cast it to vm_size_t, Marin Ramesa, 2013/12/09
[PATCH 16/29] device/dev_pager.c (device_pager_data_request_done): check if io_residual is larger or equal to zero and cast it to size_t, Marin Ramesa, 2013/12/09
[PATCH 17/29] device/dev_pager.c (device_pager_data_request_done): remove unnecessary cast, Marin Ramesa, 2013/12/09
[PATCH 18/29] device/dev_pager.c: remove forward declaration, Marin Ramesa, 2013/12/09
[PATCH 19/29] device/dev_pager.c: remove forward declarations, Marin Ramesa, 2013/12/09