]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86_64 allmodconfig:
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 26 Jul 2011 10:14:50 +0000 (20:14 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Aug 2011 05:14:23 +0000 (15:14 +1000)
In file included from arch/x86/include/asm/uaccess.h:572,
                 from include/linux/uaccess.h:5,
                 from drivers/staging/speakup/devsynth.c:4:
In function 'copy_from_user',
    inlined from 'speakup_file_write' at drivers/staging/speakup/devsynth.c:28:
arch/x86/include/asm/uaccess_64.h:64: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

I'm not sure what was unprovable about it, but size_t is the correct type
anyway.

Also replace needless min_t() with min()

Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Greg KH <greg@kroah.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/staging/speakup/devsynth.c

index 39dc586fc8bb57f21cd95aec22c336255a0a8562..940769ef883fcb7d6cad69931bc66fb5490328f9 100644 (file)
@@ -18,13 +18,14 @@ static ssize_t speakup_file_write(struct file *fp, const char *buffer,
 {
        size_t count = nbytes;
        const char *ptr = buffer;
-       int bytes;
+       size_t bytes;
        unsigned long flags;
        u_char buf[256];
+
        if (synth == NULL)
                return -ENODEV;
        while (count > 0) {
-               bytes = min_t(size_t, count, sizeof(buf));
+               bytes = min(count, sizeof(buf));
                if (copy_from_user(buf, ptr, bytes))
                        return -EFAULT;
                count -= bytes;