diff options
Diffstat (limited to 'xen')
-rw-r--r-- | xen/block.c | 8 | ||||
-rw-r--r-- | xen/console.c | 7 | ||||
-rw-r--r-- | xen/console.h | 6 | ||||
-rw-r--r-- | xen/evt.c | 3 | ||||
-rw-r--r-- | xen/net.c | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/xen/block.c b/xen/block.c index 46df3589..7d6f1ca3 100644 --- a/xen/block.c +++ b/xen/block.c @@ -247,7 +247,7 @@ void hyp_block_init(void) { /* Allocate an event channel and give it to backend. */ bd->evt = evt = hyp_event_channel_alloc(domid); hyp_evt_handler(evt, hyp_block_intr, n, SPL7); - i = sprintf(port_name, "%lu", evt); + i = sprintf(port_name, "%u", evt); c = hyp_store_write(t, port_name, 5, VBD_PATH, "/", vbds[n], "/", "event-channel"); if (!c) panic("%s: couldn't store event channel (%s)", device_name, hyp_store_error); @@ -351,7 +351,7 @@ static io_return_t device_open (ipc_port_t reply_port, mach_msg_type_name_t reply_port_type, dev_mode_t mode, char *name, device_t *devp /* out */) { - int i, err = 0; + int i; ipc_port_t port, notify; struct block_data *bd; @@ -569,13 +569,13 @@ device_write(void *d, ipc_port_t reply_port, io_return_t err = 0; vm_map_copy_t copy = (vm_map_copy_t) data; vm_offset_t aligned_buffer = 0; - int copy_npages = atop(round_page(count)); + unsigned copy_npages = atop(round_page(count)); vm_offset_t phys_addrs[copy_npages]; struct block_data *bd = d; blkif_request_t *req; grant_ref_t gref[BLKIF_MAX_SEGMENTS_PER_REQUEST]; unsigned reqn, size; - int i, nbpages, j; + unsigned i, nbpages, j; if (!(bd->mode & D_WRITE)) return D_READ_ONLY; diff --git a/xen/console.c b/xen/console.c index 313b9342..9e8db8f8 100644 --- a/xen/console.c +++ b/xen/console.c @@ -129,14 +129,14 @@ static void hypcnintr(int unit, spl_t spl, void *ret_addr, void *regs) { simple_unlock(&inlock); } -int hypcnread(int dev, io_req_t ior) +int hypcnread(dev_t dev, io_req_t ior) { struct tty *tp = &hypcn_tty; tp->t_state |= TS_CARR_ON; return char_read(tp, ior); } -int hypcnwrite(int dev, io_req_t ior) +int hypcnwrite(dev_t dev, io_req_t ior) { return char_write(&hypcn_tty, ior); } @@ -207,7 +207,7 @@ int hypcnopen(dev_t dev, int flag, io_req_t ior) return (char_open(dev, tp, flag, ior)); } -int hypcnclose(int dev, int flag) +void hypcnclose(dev_t dev, int flag) { struct tty *tp = &hypcn_tty; spl_t s = spltty(); @@ -215,7 +215,6 @@ int hypcnclose(int dev, int flag) ttyclose(tp); simple_unlock(&tp->t_lock); splx(s); - return 0; } int hypcnprobe(struct consdev *cp) diff --git a/xen/console.h b/xen/console.h index 061ba281..c129bd4a 100644 --- a/xen/console.h +++ b/xen/console.h @@ -40,9 +40,9 @@ extern int hypcnprobe(struct consdev *cp); extern int hypcninit(struct consdev *cp); extern int hypcnopen(dev_t dev, int flag, io_req_t ior); -extern int hypcnread(int dev, io_req_t ior); -extern int hypcnwrite(int dev, io_req_t ior); -extern int hypcnclose(int dev, int flag); +extern int hypcnread(dev_t dev, io_req_t ior); +extern int hypcnwrite(dev_t dev, io_req_t ior); +extern void hypcnclose(int dev, int flag); extern io_return_t hypcngetstat(dev_t dev, int flavor, int *data, unsigned int *count); extern io_return_t hypcnsetstat(dev_t dev, int flavor, int *data, unsigned int count); extern int hypcnportdeath(dev_t dev, mach_port_t port); @@ -77,7 +77,8 @@ void hyp_c_callback(void *ret_addr, void *regs) void form_int_mask(void) { - unsigned int i, j, bit, mask; + unsigned int j, bit, mask; + int i; for (i=SPL0; i < NSPL; i++) { for (j=0x00, bit=0x01, mask = 0; j < NEVNT; j++, bit<<=1) @@ -395,7 +395,7 @@ void hyp_net_init(void) { /* Allocate an event channel and give it to backend. */ nd->evt = evt = hyp_event_channel_alloc(domid); - i = sprintf(port_name, "%lu", evt); + i = sprintf(port_name, "%u", evt); c = hyp_store_write(t, port_name, 5, VIF_PATH, "/", vifs[n], "/", "event-channel"); if (!c) panic("eth: couldn't store event channel for VIF %s (%s)", vifs[n], hyp_store_error); @@ -538,7 +538,7 @@ static io_return_t device_open (ipc_port_t reply_port, mach_msg_type_name_t reply_port_type, dev_mode_t mode, char *name, device_t *devp /* out */) { - int i, n, err = 0; + int i, n; ipc_port_t port, notify; struct net_data *nd; |