ipc/shm.c: make compat_ksys_shmctl() static
authorJason Yan <yanaijie@huawei.com>
Tue, 7 Apr 2020 03:12:56 +0000 (20:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2020 17:43:45 +0000 (10:43 -0700)
Fix the following sparse warning:

ipc/shm.c:1335:6: warning: symbol 'compat_ksys_shmctl' was not declared.
Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20200403063933.24785-1-yanaijie@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/shm.c

index ce1ca9f7c6e97ca5035963d2d64e3c57fefe7f6c..0ba6add05b35afdb0ee7947c6ece7fb9ecc64c65 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1332,7 +1332,7 @@ static int copy_compat_shmid_from_user(struct shmid64_ds *out, void __user *buf,
        }
 }
 
-long compat_ksys_shmctl(int shmid, int cmd, void __user *uptr, int version)
+static long compat_ksys_shmctl(int shmid, int cmd, void __user *uptr, int version)
 {
        struct ipc_namespace *ns;
        struct shmid64_ds sem64;