From: Al Viro Date: Sat, 29 Oct 2005 10:56:13 +0000 (+0100) Subject: [PATCH] idmouse cleanup and overflow fix X-Git-Tag: v2.6.15-rc1~731^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=018a2cdf1e633497bb4f01eb86a7cbffa611776d;p=pandora-kernel.git [PATCH] idmouse cleanup and overflow fix switched to simple_read_from_buffer(), killed broken use of min(). Incidentally, that use of min() had been fixed once, only to be reintroduced in commit 4244f72436ab77c3c29a6447af81734ab3925d85: [PATCH] USB: upgrade of the idmouse driver [snip] - if (count > IMGSIZE - *ppos) - count = IMGSIZE - *ppos; + count = min ((loff_t)count, IMGSIZE - (*ppos)); Note the lovely use of cast to shut the warning about misuse of min() up... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed