Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8412a0db
Commit
8412a0db
authored
Jun 23, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 23, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: trivial drivers/net/* annotations
parent
d48bc1ac
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
69 additions
and
61 deletions
+69
-61
drivers/net/dgrs.h
drivers/net/dgrs.h
+1
-1
drivers/net/ppp_async.c
drivers/net/ppp_async.c
+18
-15
drivers/net/ppp_synctty.c
drivers/net/ppp_synctty.c
+18
-15
drivers/net/pppoe.c
drivers/net/pppoe.c
+4
-4
drivers/net/pppox.c
drivers/net/pppox.c
+1
-1
drivers/net/sk98lin/h/skdrv2nd.h
drivers/net/sk98lin/h/skdrv2nd.h
+1
-1
drivers/net/sunhme.c
drivers/net/sunhme.c
+4
-2
drivers/net/wireless/arlan-proc.c
drivers/net/wireless/arlan-proc.c
+7
-7
drivers/net/wireless/atmel.c
drivers/net/wireless/atmel.c
+1
-1
drivers/net/wireless/orinoco_pci.c
drivers/net/wireless/orinoco_pci.c
+1
-1
drivers/net/wireless/orinoco_plx.c
drivers/net/wireless/orinoco_plx.c
+1
-1
drivers/net/wireless/orinoco_tmd.c
drivers/net/wireless/orinoco_tmd.c
+1
-1
drivers/net/wireless/ray_cs.c
drivers/net/wireless/ray_cs.c
+2
-2
drivers/net/wireless/strip.c
drivers/net/wireless/strip.c
+9
-9
No files found.
drivers/net/dgrs.h
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/ppp_async.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/ppp_synctty.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/pppoe.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/pppox.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/sk98lin/h/skdrv2nd.h
View file @
8412a0db
...
@@ -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
;
};
};
...
...
drivers/net/sunhme.c
View file @
8412a0db
...
@@ -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
,
...
...
drivers/net/wireless/arlan-proc.c
View file @
8412a0db
...
@@ -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'
;
...
...
drivers/net/wireless/atmel.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/wireless/orinoco_pci.c
View file @
8412a0db
...
@@ -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
);
}
}
...
...
drivers/net/wireless/orinoco_plx.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/wireless/orinoco_tmd.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/wireless/ray_cs.c
View file @
8412a0db
...
@@ -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
;
...
...
drivers/net/wireless/strip.c
View file @
8412a0db
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment