This got caught by gcc on 64bit boxen - IMGSIZE is size_t and that means
range not covered by that of signed 64bit, so we get an unsigned type for
IMGSIZE-*ppos. On 32bit boxen IMGSIZE-*ppos ends up being loff_t, so the
warning gets silenced.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
return 0;
}
- count = min ((loff_t)count, IMGSIZE - (*ppos));
+ if (count > IMGSIZE - *ppos)
+ count = IMGSIZE - *ppos;
if (copy_to_user (buffer, dev->bulk_in_buffer + *ppos, count)) {
result = -EFAULT;