.. | .. |
---|
128 | 128 | { |
---|
129 | 129 | struct xenbus_file_priv *u = filp->private_data; |
---|
130 | 130 | struct read_buffer *rb; |
---|
131 | | - unsigned i; |
---|
| 131 | + ssize_t i; |
---|
132 | 132 | int ret; |
---|
133 | 133 | |
---|
134 | 134 | mutex_lock(&u->reply_mutex); |
---|
.. | .. |
---|
148 | 148 | rb = list_entry(u->read_buffers.next, struct read_buffer, list); |
---|
149 | 149 | i = 0; |
---|
150 | 150 | while (i < len) { |
---|
151 | | - unsigned sz = min((unsigned)len - i, rb->len - rb->cons); |
---|
| 151 | + size_t sz = min_t(size_t, len - i, rb->len - rb->cons); |
---|
152 | 152 | |
---|
153 | 153 | ret = copy_to_user(ubuf + i, &rb->msg[rb->cons], sz); |
---|
154 | 154 | |
---|
.. | .. |
---|
498 | 498 | struct watch_adapter *watch; |
---|
499 | 499 | char *path, *token; |
---|
500 | 500 | int err, rc; |
---|
501 | | - LIST_HEAD(staging_q); |
---|
502 | 501 | |
---|
503 | 502 | path = u->u.buffer + sizeof(u->u.msg); |
---|
504 | 503 | token = memchr(path, 0, u->u.msg.len); |
---|
.. | .. |
---|
556 | 555 | uint32_t msg_type; |
---|
557 | 556 | int rc = len; |
---|
558 | 557 | int ret; |
---|
559 | | - LIST_HEAD(staging_q); |
---|
560 | 558 | |
---|
561 | 559 | /* |
---|
562 | 560 | * We're expecting usermode to be writing properly formed |
---|