alpha: switch pci syscalls to SYSCALL_DEFINE
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 18 Mar 2018 16:58:18 +0000 (12:58 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 28 Mar 2018 12:58:19 +0000 (08:58 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/alpha/kernel/pci-noop.c
arch/alpha/kernel/pci.c

index b995987b1557e1cb9e4e54bfd0546367f3e58ba4..b6ebb65127a80e8bfc3dfce3580655bcc7d0a540 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/sched.h>
 #include <linux/dma-mapping.h>
 #include <linux/scatterlist.h>
+#include <linux/syscalls.h>
 
 #include "proto.h"
 
@@ -46,8 +47,8 @@ alloc_resource(void)
        return alloc_bootmem(sizeof(struct resource));
 }
 
-asmlinkage long
-sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
+SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, bus,
+               unsigned long, dfn)
 {
        struct pci_controller *hose;
 
@@ -84,9 +85,8 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
        return -EOPNOTSUPP;
 }
 
-asmlinkage long
-sys_pciconfig_read(unsigned long bus, unsigned long dfn,
-                  unsigned long off, unsigned long len, void *buf)
+SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn,
+               unsigned long, off, unsigned long, len, void __user *, buf)
 {
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
@@ -94,9 +94,8 @@ sys_pciconfig_read(unsigned long bus, unsigned long dfn,
                return -ENODEV;
 }
 
-asmlinkage long
-sys_pciconfig_write(unsigned long bus, unsigned long dfn,
-                   unsigned long off, unsigned long len, void *buf)
+SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn,
+               unsigned long, off, unsigned long, len, void __user *, buf)
 {
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
index 2e86ebb680ae52c12976c5cd47e500375fc11448..c668c3b7a1673276d2d3371a5ecb94bb2640decb 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/module.h>
 #include <linux/cache.h>
 #include <linux/slab.h>
+#include <linux/syscalls.h>
 #include <asm/machvec.h>
 
 #include "proto.h"
@@ -409,8 +410,8 @@ alloc_resource(void)
 /* Provide information on locations of various I/O regions in physical
    memory.  Do this on a per-card basis so that we choose the right hose.  */
 
-asmlinkage long
-sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
+SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, bus,
+               unsigned long, dfn)
 {
        struct pci_controller *hose;
        struct pci_dev *dev;