diff options
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/client.c | 2 | ||||
-rw-r--r-- | net/9p/protocol.c | 2 | ||||
-rw-r--r-- | net/9p/trans_virtio.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index a170893d70e0..8260f132b32e 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1548,7 +1548,7 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, | |||
1548 | kernel_buf = 1; | 1548 | kernel_buf = 1; |
1549 | indata = data; | 1549 | indata = data; |
1550 | } else | 1550 | } else |
1551 | indata = (char *)udata; | 1551 | indata = (__force char *)udata; |
1552 | /* | 1552 | /* |
1553 | * response header len is 11 | 1553 | * response header len is 11 |
1554 | * PDU Header(7) + IO Size (4) | 1554 | * PDU Header(7) + IO Size (4) |
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 9ee48cb30179..3d33ecf13327 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
@@ -368,7 +368,7 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, | |||
368 | const char *sptr = va_arg(ap, const char *); | 368 | const char *sptr = va_arg(ap, const char *); |
369 | uint16_t len = 0; | 369 | uint16_t len = 0; |
370 | if (sptr) | 370 | if (sptr) |
371 | len = min_t(uint16_t, strlen(sptr), | 371 | len = min_t(size_t, strlen(sptr), |
372 | USHRT_MAX); | 372 | USHRT_MAX); |
373 | 373 | ||
374 | errcode = p9pdu_writef(pdu, proto_version, | 374 | errcode = p9pdu_writef(pdu, proto_version, |
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 5af18d11b518..35b8911b1c8e 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -192,10 +192,10 @@ static int pack_sg_list(struct scatterlist *sg, int start, | |||
192 | s = rest_of_page(data); | 192 | s = rest_of_page(data); |
193 | if (s > count) | 193 | if (s > count) |
194 | s = count; | 194 | s = count; |
195 | BUG_ON(index > limit); | ||
195 | sg_set_buf(&sg[index++], data, s); | 196 | sg_set_buf(&sg[index++], data, s); |
196 | count -= s; | 197 | count -= s; |
197 | data += s; | 198 | data += s; |
198 | BUG_ON(index > limit); | ||
199 | } | 199 | } |
200 | 200 | ||
201 | return index-start; | 201 | return index-start; |
@@ -212,7 +212,7 @@ static int p9_virtio_cancel(struct p9_client *client, struct p9_req_t *req) | |||
212 | * this takes a list of pages. | 212 | * this takes a list of pages. |
213 | * @sg: scatter/gather list to pack into | 213 | * @sg: scatter/gather list to pack into |
214 | * @start: which segment of the sg_list to start at | 214 | * @start: which segment of the sg_list to start at |
215 | * @**pdata: a list of pages to add into sg. | 215 | * @pdata: a list of pages to add into sg. |
216 | * @nr_pages: number of pages to pack into the scatter/gather list | 216 | * @nr_pages: number of pages to pack into the scatter/gather list |
217 | * @data: data to pack into scatter/gather list | 217 | * @data: data to pack into scatter/gather list |
218 | * @count: amount of data to pack into the scatter/gather list | 218 | * @count: amount of data to pack into the scatter/gather list |