aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2010-05-24 17:33:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 11:07:02 -0400
commit4be929be34f9bdeffa40d815d32d7d60d2c7f03b (patch)
tree4d2c6e2b8ef766e565e2e050ee151de2e02081d3 /drivers/vhost
parent940370fc86b920b51a34217a1facc3e9e97c2456 (diff)
kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN
- C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not USHORT_MAX/SHORT_MAX/SHORT_MIN. - Make SHRT_MIN of type s16, not int, for consistency. [akpm@linux-foundation.org: fix drivers/dma/timb_dma.c] [akpm@linux-foundation.org: fix security/keys/keyring.c] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vhost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 750effe0f98b..c6fb8e968f21 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -806,7 +806,7 @@ static unsigned get_indirect(struct vhost_dev *dev, struct vhost_virtqueue *vq,
806 count = indirect->len / sizeof desc; 806 count = indirect->len / sizeof desc;
807 /* Buffers are chained via a 16 bit next field, so 807 /* Buffers are chained via a 16 bit next field, so
808 * we can have at most 2^16 of these. */ 808 * we can have at most 2^16 of these. */
809 if (count > USHORT_MAX + 1) { 809 if (count > USHRT_MAX + 1) {
810 vq_err(vq, "Indirect buffer length too big: %d\n", 810 vq_err(vq, "Indirect buffer length too big: %d\n",
811 indirect->len); 811 indirect->len);
812 return -E2BIG; 812 return -E2BIG;