Commit 8412a0db authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: trivial drivers/net/* annotations

parent d48bc1ac
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
typedef struct dgrs_ioctl { typedef struct dgrs_ioctl {
unsigned short cmd; /* Command to run */ unsigned short cmd; /* Command to run */
unsigned short len; /* Length of the data buffer */ unsigned short len; /* Length of the data buffer */
unsigned char *data; /* Pointer to the data buffer */ unsigned char __user *data; /* Pointer to the data buffer */
unsigned short port; /* port number for command, if needed */ unsigned short port; /* port number for command, if needed */
unsigned short filter; /* filter number for command, if needed */ unsigned short filter; /* filter number for command, if needed */
} DGRS_IOCTL; } DGRS_IOCTL;
......
...@@ -238,7 +238,7 @@ ppp_asynctty_close(struct tty_struct *tty) ...@@ -238,7 +238,7 @@ ppp_asynctty_close(struct tty_struct *tty)
*/ */
static ssize_t static ssize_t
ppp_asynctty_read(struct tty_struct *tty, struct file *file, ppp_asynctty_read(struct tty_struct *tty, struct file *file,
unsigned char *buf, size_t count) unsigned char __user *buf, size_t count)
{ {
return -EAGAIN; return -EAGAIN;
} }
...@@ -249,7 +249,7 @@ ppp_asynctty_read(struct tty_struct *tty, struct file *file, ...@@ -249,7 +249,7 @@ ppp_asynctty_read(struct tty_struct *tty, struct file *file,
*/ */
static ssize_t static ssize_t
ppp_asynctty_write(struct tty_struct *tty, struct file *file, ppp_asynctty_write(struct tty_struct *tty, struct file *file,
const unsigned char *buf, size_t count) const unsigned char __user *buf, size_t count)
{ {
return -EAGAIN; return -EAGAIN;
} }
...@@ -260,6 +260,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -260,6 +260,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
{ {
struct asyncppp *ap = ap_get(tty); struct asyncppp *ap = ap_get(tty);
int err, val; int err, val;
int __user *p = (int __user *)arg;
if (ap == 0) if (ap == 0)
return -ENXIO; return -ENXIO;
...@@ -270,7 +271,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -270,7 +271,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
if (ap == 0) if (ap == 0)
break; break;
err = -EFAULT; err = -EFAULT;
if (put_user(ppp_channel_index(&ap->chan), (int *) arg)) if (put_user(ppp_channel_index(&ap->chan), p))
break; break;
err = 0; err = 0;
break; break;
...@@ -280,7 +281,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -280,7 +281,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
if (ap == 0) if (ap == 0)
break; break;
err = -EFAULT; err = -EFAULT;
if (put_user(ppp_unit_number(&ap->chan), (int *) arg)) if (put_user(ppp_unit_number(&ap->chan), p))
break; break;
err = 0; err = 0;
break; break;
...@@ -299,7 +300,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -299,7 +300,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
case FIONREAD: case FIONREAD:
val = 0; val = 0;
if (put_user(val, (int *) arg)) if (put_user(val, p))
break; break;
err = 0; err = 0;
break; break;
...@@ -397,6 +398,8 @@ static int ...@@ -397,6 +398,8 @@ static int
ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
{ {
struct asyncppp *ap = chan->private; struct asyncppp *ap = chan->private;
void __user *argp = (void __user *)arg;
int __user *p = argp;
int err, val; int err, val;
u32 accm[8]; u32 accm[8];
...@@ -404,12 +407,12 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) ...@@ -404,12 +407,12 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
switch (cmd) { switch (cmd) {
case PPPIOCGFLAGS: case PPPIOCGFLAGS:
val = ap->flags | ap->rbits; val = ap->flags | ap->rbits;
if (put_user(val, (int *) arg)) if (put_user(val, p))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSFLAGS: case PPPIOCSFLAGS:
if (get_user(val, (int *) arg)) if (get_user(val, p))
break; break;
ap->flags = val & ~SC_RCV_BITS; ap->flags = val & ~SC_RCV_BITS;
spin_lock_irq(&ap->recv_lock); spin_lock_irq(&ap->recv_lock);
...@@ -419,34 +422,34 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) ...@@ -419,34 +422,34 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
break; break;
case PPPIOCGASYNCMAP: case PPPIOCGASYNCMAP:
if (put_user(ap->xaccm[0], (u32 *) arg)) if (put_user(ap->xaccm[0], (u32 __user *)argp))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSASYNCMAP: case PPPIOCSASYNCMAP:
if (get_user(ap->xaccm[0], (u32 *) arg)) if (get_user(ap->xaccm[0], (u32 __user *)argp))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCGRASYNCMAP: case PPPIOCGRASYNCMAP:
if (put_user(ap->raccm, (u32 *) arg)) if (put_user(ap->raccm, (u32 __user *)argp))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSRASYNCMAP: case PPPIOCSRASYNCMAP:
if (get_user(ap->raccm, (u32 *) arg)) if (get_user(ap->raccm, (u32 __user *)argp))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCGXASYNCMAP: case PPPIOCGXASYNCMAP:
if (copy_to_user((void __user *) arg, ap->xaccm, sizeof(ap->xaccm))) if (copy_to_user(argp, ap->xaccm, sizeof(ap->xaccm)))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSXASYNCMAP: case PPPIOCSXASYNCMAP:
if (copy_from_user(accm, (void __user *) arg, sizeof(accm))) if (copy_from_user(accm, argp, sizeof(accm)))
break; break;
accm[2] &= ~0x40000000U; /* can't escape 0x5e */ accm[2] &= ~0x40000000U; /* can't escape 0x5e */
accm[3] |= 0x60000000U; /* must escape 0x7d, 0x7e */ accm[3] |= 0x60000000U; /* must escape 0x7d, 0x7e */
...@@ -455,12 +458,12 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) ...@@ -455,12 +458,12 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
break; break;
case PPPIOCGMRU: case PPPIOCGMRU:
if (put_user(ap->mru, (int *) arg)) if (put_user(ap->mru, p))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSMRU: case PPPIOCSMRU:
if (get_user(val, (int *) arg)) if (get_user(val, p))
break; break;
if (val < PPP_MRU) if (val < PPP_MRU)
val = PPP_MRU; val = PPP_MRU;
......
...@@ -288,7 +288,7 @@ ppp_sync_close(struct tty_struct *tty) ...@@ -288,7 +288,7 @@ ppp_sync_close(struct tty_struct *tty)
*/ */
static ssize_t static ssize_t
ppp_sync_read(struct tty_struct *tty, struct file *file, ppp_sync_read(struct tty_struct *tty, struct file *file,
unsigned char *buf, size_t count) unsigned char __user *buf, size_t count)
{ {
return -EAGAIN; return -EAGAIN;
} }
...@@ -299,7 +299,7 @@ ppp_sync_read(struct tty_struct *tty, struct file *file, ...@@ -299,7 +299,7 @@ ppp_sync_read(struct tty_struct *tty, struct file *file,
*/ */
static ssize_t static ssize_t
ppp_sync_write(struct tty_struct *tty, struct file *file, ppp_sync_write(struct tty_struct *tty, struct file *file,
const unsigned char *buf, size_t count) const unsigned char __user *buf, size_t count)
{ {
return -EAGAIN; return -EAGAIN;
} }
...@@ -309,6 +309,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -309,6 +309,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct syncppp *ap = sp_get(tty); struct syncppp *ap = sp_get(tty);
int __user *p = (int __user *)arg;
int err, val; int err, val;
if (ap == 0) if (ap == 0)
...@@ -320,7 +321,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -320,7 +321,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
if (ap == 0) if (ap == 0)
break; break;
err = -EFAULT; err = -EFAULT;
if (put_user(ppp_channel_index(&ap->chan), (int *) arg)) if (put_user(ppp_channel_index(&ap->chan), p))
break; break;
err = 0; err = 0;
break; break;
...@@ -330,7 +331,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -330,7 +331,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
if (ap == 0) if (ap == 0)
break; break;
err = -EFAULT; err = -EFAULT;
if (put_user(ppp_unit_number(&ap->chan), (int *) arg)) if (put_user(ppp_unit_number(&ap->chan), p))
break; break;
err = 0; err = 0;
break; break;
...@@ -349,7 +350,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -349,7 +350,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
case FIONREAD: case FIONREAD:
val = 0; val = 0;
if (put_user(val, (int *) arg)) if (put_user(val, p))
break; break;
err = 0; err = 0;
break; break;
...@@ -449,17 +450,19 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) ...@@ -449,17 +450,19 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
struct syncppp *ap = chan->private; struct syncppp *ap = chan->private;
int err, val; int err, val;
u32 accm[8]; u32 accm[8];
void __user *argp = (void __user *)arg;
u32 __user *p = argp;
err = -EFAULT; err = -EFAULT;
switch (cmd) { switch (cmd) {
case PPPIOCGFLAGS: case PPPIOCGFLAGS:
val = ap->flags | ap->rbits; val = ap->flags | ap->rbits;
if (put_user(val, (int *) arg)) if (put_user(val, (int __user *) argp))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSFLAGS: case PPPIOCSFLAGS:
if (get_user(val, (int *) arg)) if (get_user(val, (int __user *) argp))
break; break;
ap->flags = val & ~SC_RCV_BITS; ap->flags = val & ~SC_RCV_BITS;
spin_lock_irq(&ap->recv_lock); spin_lock_irq(&ap->recv_lock);
...@@ -469,34 +472,34 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) ...@@ -469,34 +472,34 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
break; break;
case PPPIOCGASYNCMAP: case PPPIOCGASYNCMAP:
if (put_user(ap->xaccm[0], (u32 *) arg)) if (put_user(ap->xaccm[0], p))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSASYNCMAP: case PPPIOCSASYNCMAP:
if (get_user(ap->xaccm[0], (u32 *) arg)) if (get_user(ap->xaccm[0], p))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCGRASYNCMAP: case PPPIOCGRASYNCMAP:
if (put_user(ap->raccm, (u32 *) arg)) if (put_user(ap->raccm, p))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSRASYNCMAP: case PPPIOCSRASYNCMAP:
if (get_user(ap->raccm, (u32 *) arg)) if (get_user(ap->raccm, p))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCGXASYNCMAP: case PPPIOCGXASYNCMAP:
if (copy_to_user((void *) arg, ap->xaccm, sizeof(ap->xaccm))) if (copy_to_user(argp, ap->xaccm, sizeof(ap->xaccm)))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSXASYNCMAP: case PPPIOCSXASYNCMAP:
if (copy_from_user(accm, (void *) arg, sizeof(accm))) if (copy_from_user(accm, argp, sizeof(accm)))
break; break;
accm[2] &= ~0x40000000U; /* can't escape 0x5e */ accm[2] &= ~0x40000000U; /* can't escape 0x5e */
accm[3] |= 0x60000000U; /* must escape 0x7d, 0x7e */ accm[3] |= 0x60000000U; /* must escape 0x7d, 0x7e */
...@@ -505,12 +508,12 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) ...@@ -505,12 +508,12 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
break; break;
case PPPIOCGMRU: case PPPIOCGMRU:
if (put_user(ap->mru, (int *) arg)) if (put_user(ap->mru, (int __user *) argp))
break; break;
err = 0; err = 0;
break; break;
case PPPIOCSMRU: case PPPIOCSMRU:
if (get_user(val, (int *) arg)) if (get_user(val, (int __user *) argp))
break; break;
if (val < PPP_MRU) if (val < PPP_MRU)
val = PPP_MRU; val = PPP_MRU;
......
...@@ -691,7 +691,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, ...@@ -691,7 +691,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd,
if (put_user(po->pppoe_dev->mtu - if (put_user(po->pppoe_dev->mtu -
sizeof(struct pppoe_hdr) - sizeof(struct pppoe_hdr) -
PPP_HDRLEN, PPP_HDRLEN,
(int *) arg)) (int __user *) arg))
break; break;
err = 0; err = 0;
break; break;
...@@ -702,7 +702,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, ...@@ -702,7 +702,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd,
break; break;
err = -EFAULT; err = -EFAULT;
if (get_user(val,(int *) arg)) if (get_user(val,(int __user *) arg))
break; break;
if (val < (po->pppoe_dev->mtu if (val < (po->pppoe_dev->mtu
...@@ -715,7 +715,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, ...@@ -715,7 +715,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd,
case PPPIOCSFLAGS: case PPPIOCSFLAGS:
err = -EFAULT; err = -EFAULT;
if (get_user(val, (int *) arg)) if (get_user(val, (int __user *) arg))
break; break;
err = 0; err = 0;
break; break;
...@@ -736,7 +736,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, ...@@ -736,7 +736,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd,
PPPoE address to which frames are forwarded to */ PPPoE address to which frames are forwarded to */
err = -EFAULT; err = -EFAULT;
if (copy_from_user(&po->pppoe_relay, if (copy_from_user(&po->pppoe_relay,
(void*)arg, (void __user *)arg,
sizeof(struct sockaddr_pppox))) sizeof(struct sockaddr_pppox)))
break; break;
......
...@@ -86,7 +86,7 @@ static int pppox_ioctl(struct socket* sock, unsigned int cmd, ...@@ -86,7 +86,7 @@ static int pppox_ioctl(struct socket* sock, unsigned int cmd,
rc = -EINVAL; rc = -EINVAL;
index = ppp_channel_index(&po->chan); index = ppp_channel_index(&po->chan);
if (put_user(index , (int *) arg)) if (put_user(index , (int __user *) arg))
break; break;
rc = 0; rc = 0;
......
...@@ -170,7 +170,7 @@ struct s_DrvRlmtMbuf { ...@@ -170,7 +170,7 @@ struct s_DrvRlmtMbuf {
typedef struct s_IOCTL SK_GE_IOCTL; typedef struct s_IOCTL SK_GE_IOCTL;
struct s_IOCTL { struct s_IOCTL {
char* pData; char __user * pData;
unsigned int Len; unsigned int Len;
}; };
......
...@@ -528,8 +528,10 @@ static void happy_meal_tcvr_write(struct happy_meal *hp, ...@@ -528,8 +528,10 @@ static void happy_meal_tcvr_write(struct happy_meal *hp,
ASD(("happy_meal_tcvr_write: reg=0x%02x value=%04x\n", reg, value)); ASD(("happy_meal_tcvr_write: reg=0x%02x value=%04x\n", reg, value));
/* Welcome to Sun Microsystems, can I take your order please? */ /* Welcome to Sun Microsystems, can I take your order please? */
if (!(hp->happy_flags & HFLAG_FENABLE)) if (!(hp->happy_flags & HFLAG_FENABLE)) {
return happy_meal_bb_write(hp, tregs, reg, value); happy_meal_bb_write(hp, tregs, reg, value);
return;
}
/* Would you like fries with that? */ /* Would you like fries with that? */
hme_write32(hp, tregs + TCVR_FRAME, hme_write32(hp, tregs + TCVR_FRAME,
......
...@@ -399,7 +399,7 @@ static int arlan_setup_card_by_book(struct net_device *dev) ...@@ -399,7 +399,7 @@ static int arlan_setup_card_by_book(struct net_device *dev)
static char arlan_drive_info[ARLAN_STR_SIZE] = "A655\n\0"; static char arlan_drive_info[ARLAN_STR_SIZE] = "A655\n\0";
static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp, static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,
void *buffer, size_t * lenp) void __user *buffer, size_t * lenp)
{ {
int i; int i;
int retv, pos, devnum; int retv, pos, devnum;
...@@ -636,7 +636,7 @@ static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp, ...@@ -636,7 +636,7 @@ static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,
static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp, static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp,
void *buffer, size_t * lenp) void __user *buffer, size_t * lenp)
{ {
int i; int i;
int retv, pos, devnum; int retv, pos, devnum;
...@@ -670,7 +670,7 @@ static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp ...@@ -670,7 +670,7 @@ static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp
} }
static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp, static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp,
void *buffer, size_t * lenp) void __user *buffer, size_t * lenp)
{ {
int i; int i;
int retv, pos, devnum; int retv, pos, devnum;
...@@ -699,7 +699,7 @@ static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp ...@@ -699,7 +699,7 @@ static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp
} }
static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp, static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp,
void *buffer, size_t * lenp) void __user *buffer, size_t * lenp)
{ {
int i; int i;
int retv, pos, devnum; int retv, pos, devnum;
...@@ -727,7 +727,7 @@ static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp ...@@ -727,7 +727,7 @@ static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp
} }
static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp, static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp,
void *buffer, size_t * lenp) void __user *buffer, size_t * lenp)
{ {
int i; int i;
int retv, pos, devnum; int retv, pos, devnum;
...@@ -763,7 +763,7 @@ static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp, ...@@ -763,7 +763,7 @@ static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp,
static char conf_reset_result[200]; static char conf_reset_result[200];
static int arlan_configure(ctl_table * ctl, int write, struct file *filp, static int arlan_configure(ctl_table * ctl, int write, struct file *filp,
void *buffer, size_t * lenp) void __user *buffer, size_t * lenp)
{ {
int pos = 0; int pos = 0;
int devnum = ctl->procname[6] - '0'; int devnum = ctl->procname[6] - '0';
...@@ -788,7 +788,7 @@ static int arlan_configure(ctl_table * ctl, int write, struct file *filp, ...@@ -788,7 +788,7 @@ static int arlan_configure(ctl_table * ctl, int write, struct file *filp,
} }
static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp, static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
void *buffer, size_t * lenp) void __user *buffer, size_t * lenp)
{ {
int pos = 0; int pos = 0;
int devnum = ctl->procname[5] - '0'; int devnum = ctl->procname[5] - '0';
......
...@@ -2360,7 +2360,7 @@ static const iw_handler atmel_private_handler[] = ...@@ -2360,7 +2360,7 @@ static const iw_handler atmel_private_handler[] =
typedef struct atmel_priv_ioctl { typedef struct atmel_priv_ioctl {
char id[32]; char id[32];
unsigned char *data; unsigned char __user *data;
unsigned short len; unsigned short len;
} atmel_priv_ioctl; } atmel_priv_ioctl;
......
...@@ -384,7 +384,7 @@ static int __init orinoco_pci_init(void) ...@@ -384,7 +384,7 @@ static int __init orinoco_pci_init(void)
return pci_module_init(&orinoco_pci_driver); return pci_module_init(&orinoco_pci_driver);
} }
extern void __exit orinoco_pci_exit(void) void __exit orinoco_pci_exit(void)
{ {
pci_unregister_driver(&orinoco_pci_driver); pci_unregister_driver(&orinoco_pci_driver);
} }
......
...@@ -341,7 +341,7 @@ static int __init orinoco_plx_init(void) ...@@ -341,7 +341,7 @@ static int __init orinoco_plx_init(void)
return pci_module_init(&orinoco_plx_driver); return pci_module_init(&orinoco_plx_driver);
} }
extern void __exit orinoco_plx_exit(void) void __exit orinoco_plx_exit(void)
{ {
pci_unregister_driver(&orinoco_plx_driver); pci_unregister_driver(&orinoco_plx_driver);
current->state = TASK_UNINTERRUPTIBLE; current->state = TASK_UNINTERRUPTIBLE;
......
...@@ -219,7 +219,7 @@ static int __init orinoco_tmd_init(void) ...@@ -219,7 +219,7 @@ static int __init orinoco_tmd_init(void)
return pci_module_init(&orinoco_tmd_driver); return pci_module_init(&orinoco_tmd_driver);
} }
extern void __exit orinoco_tmd_exit(void) void __exit orinoco_tmd_exit(void)
{ {
pci_unregister_driver(&orinoco_tmd_driver); pci_unregister_driver(&orinoco_tmd_driver);
current->state = TASK_UNINTERRUPTIBLE; current->state = TASK_UNINTERRUPTIBLE;
......
...@@ -2854,7 +2854,7 @@ static void raycs_write(const char *name, write_proc_t *w, void *data) ...@@ -2854,7 +2854,7 @@ static void raycs_write(const char *name, write_proc_t *w, void *data)
} }
} }
static int write_essid(struct file *file, const char *buffer, unsigned long count, void *data) static int write_essid(struct file *file, const char __user *buffer, unsigned long count, void *data)
{ {
static char proc_essid[33]; static char proc_essid[33];
int len = count; int len = count;
...@@ -2868,7 +2868,7 @@ static int write_essid(struct file *file, const char *buffer, unsigned long coun ...@@ -2868,7 +2868,7 @@ static int write_essid(struct file *file, const char *buffer, unsigned long coun
return count; return count;
} }
static int write_int(struct file *file, const char *buffer, unsigned long count, void *data) static int write_int(struct file *file, const char __user *buffer, unsigned long count, void *data)
{ {
static char proc_number[10]; static char proc_number[10];
char *p; char *p;
......
...@@ -409,12 +409,12 @@ static const MetricomAddress zero_address; ...@@ -409,12 +409,12 @@ static const MetricomAddress zero_address;
static const MetricomAddress broadcast_address = static const MetricomAddress broadcast_address =
{ {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} }; { {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} };
static const MetricomKey SIP0Key = { {"SIP0"} }; static const MetricomKey SIP0Key = { "SIP0" };
static const MetricomKey ARP0Key = { {"ARP0"} }; static const MetricomKey ARP0Key = { "ARP0" };
static const MetricomKey ATR_Key = { {"ATR "} }; static const MetricomKey ATR_Key = { "ATR " };
static const MetricomKey ACK_Key = { {"ACK_"} }; static const MetricomKey ACK_Key = { "ACK_" };
static const MetricomKey INF_Key = { {"INF_"} }; static const MetricomKey INF_Key = { "INF_" };
static const MetricomKey ERR_Key = { {"ERR_"} }; static const MetricomKey ERR_Key = { "ERR_" };
static const long MaxARPInterval = 60 * HZ; /* One minute */ static const long MaxARPInterval = 60 * HZ; /* One minute */
...@@ -2733,14 +2733,14 @@ static int strip_ioctl(struct tty_struct *tty, struct file *file, ...@@ -2733,14 +2733,14 @@ static int strip_ioctl(struct tty_struct *tty, struct file *file,
switch (cmd) { switch (cmd) {
case SIOCGIFNAME: case SIOCGIFNAME:
if(copy_to_user((void *) arg, strip_info->dev->name, strlen(strip_info->dev->name) + 1)) if(copy_to_user((void __user *) arg, strip_info->dev->name, strlen(strip_info->dev->name) + 1))
return -EFAULT; return -EFAULT;
break; break;
case SIOCSIFHWADDR: case SIOCSIFHWADDR:
{ {
MetricomAddress addr; MetricomAddress addr;
//printk(KERN_INFO "%s: SIOCSIFHWADDR\n", strip_info->dev->name); //printk(KERN_INFO "%s: SIOCSIFHWADDR\n", strip_info->dev->name);
if(copy_from_user(&addr, (void *) arg, sizeof(MetricomAddress))) if(copy_from_user(&addr, (void __user *) arg, sizeof(MetricomAddress)))
return -EFAULT; return -EFAULT;
return set_mac_address(strip_info, &addr); return set_mac_address(strip_info, &addr);
} }
...@@ -2750,7 +2750,7 @@ static int strip_ioctl(struct tty_struct *tty, struct file *file, ...@@ -2750,7 +2750,7 @@ static int strip_ioctl(struct tty_struct *tty, struct file *file,
case TCGETS: case TCGETS:
case TCGETA: case TCGETA:
return n_tty_ioctl(tty, (struct file *) file, cmd, (unsigned long) arg); return n_tty_ioctl(tty, file, cmd, arg);
break; break;
default: default:
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment