]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fs/ioctl: remove unnecessary __user annotation
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Fri, 14 Jan 2022 22:03:55 +0000 (14:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Jan 2022 14:30:25 +0000 (16:30 +0200)
__user annotations are used by the checker (e.g sparse) to mark user
pointers.  However here __user is applied to a struct directly, without a
pointer being directly involved.

Although the presence of __user does not cause sparse to emit a warning,
__user should be removed for consistency with other uses of offsetof().

Note: No functional changes intended.

Link: https://lkml.kernel.org/r/20211122101256.7875-1-amit.kachhap@arm.com
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Vincenzo Frascino <Vincenzo.Frascino@arm.com>
Cc: Kevin Brodsky <Kevin.Brodsky@arm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ioctl.c

index 504e6957811240cb253dfb14fc54e04fd48100a5..1ed097e94af2dd093c3af3fc826aa6270c307337 100644 (file)
@@ -430,7 +430,7 @@ static int ioctl_file_dedupe_range(struct file *file,
                goto out;
        }
 
-       size = offsetof(struct file_dedupe_range __user, info[count]);
+       size = offsetof(struct file_dedupe_range, info[count]);
        if (size > PAGE_SIZE) {
                ret = -ENOMEM;
                goto out;