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
nexedi
linux
Commits
aee99716
Commit
aee99716
authored
May 28, 2004
by
Alexander Viro
Committed by
Linus Torvalds
May 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: partial serial_core.c __user annotation
parent
7ca9ab3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
drivers/serial/serial_core.c
drivers/serial/serial_core.c
+9
-9
No files found.
drivers/serial/serial_core.c
View file @
aee99716
...
@@ -460,7 +460,7 @@ __uart_put_char(struct uart_port *port, struct circ_buf *circ, unsigned char c)
...
@@ -460,7 +460,7 @@ __uart_put_char(struct uart_port *port, struct circ_buf *circ, unsigned char c)
static
inline
int
static
inline
int
__uart_user_write
(
struct
uart_port
*
port
,
struct
circ_buf
*
circ
,
__uart_user_write
(
struct
uart_port
*
port
,
struct
circ_buf
*
circ
,
const
unsigned
char
*
buf
,
int
count
)
const
unsigned
char
__user
*
buf
,
int
count
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
int
c
,
ret
=
0
;
int
c
,
ret
=
0
;
...
@@ -634,7 +634,7 @@ static void uart_unthrottle(struct tty_struct *tty)
...
@@ -634,7 +634,7 @@ static void uart_unthrottle(struct tty_struct *tty)
uart_set_mctrl
(
port
,
TIOCM_RTS
);
uart_set_mctrl
(
port
,
TIOCM_RTS
);
}
}
static
int
uart_get_info
(
struct
uart_state
*
state
,
struct
serial_struct
*
retinfo
)
static
int
uart_get_info
(
struct
uart_state
*
state
,
struct
serial_struct
__user
*
retinfo
)
{
{
struct
uart_port
*
port
=
state
->
port
;
struct
uart_port
*
port
=
state
->
port
;
struct
serial_struct
tmp
;
struct
serial_struct
tmp
;
...
@@ -663,7 +663,7 @@ static int uart_get_info(struct uart_state *state, struct serial_struct *retinfo
...
@@ -663,7 +663,7 @@ static int uart_get_info(struct uart_state *state, struct serial_struct *retinfo
}
}
static
int
static
int
uart_set_info
(
struct
uart_state
*
state
,
struct
serial_struct
*
newinfo
)
uart_set_info
(
struct
uart_state
*
state
,
struct
serial_struct
__user
*
newinfo
)
{
{
struct
serial_struct
new_serial
;
struct
serial_struct
new_serial
;
struct
uart_port
*
port
=
state
->
port
;
struct
uart_port
*
port
=
state
->
port
;
...
@@ -856,7 +856,7 @@ uart_set_info(struct uart_state *state, struct serial_struct *newinfo)
...
@@ -856,7 +856,7 @@ uart_set_info(struct uart_state *state, struct serial_struct *newinfo)
* uart_get_lsr_info - get line status register info.
* uart_get_lsr_info - get line status register info.
* Note: uart_ioctl protects us against hangups.
* Note: uart_ioctl protects us against hangups.
*/
*/
static
int
uart_get_lsr_info
(
struct
uart_state
*
state
,
unsigned
int
*
value
)
static
int
uart_get_lsr_info
(
struct
uart_state
*
state
,
unsigned
int
__user
*
value
)
{
{
struct
uart_port
*
port
=
state
->
port
;
struct
uart_port
*
port
=
state
->
port
;
unsigned
int
result
;
unsigned
int
result
;
...
@@ -1036,7 +1036,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
...
@@ -1036,7 +1036,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
* RI where only 0->1 is counted.
* RI where only 0->1 is counted.
*/
*/
static
int
static
int
uart_get_count
(
struct
uart_state
*
state
,
struct
serial_icounter_struct
*
icnt
)
uart_get_count
(
struct
uart_state
*
state
,
struct
serial_icounter_struct
__user
*
icnt
)
{
{
struct
serial_icounter_struct
icount
;
struct
serial_icounter_struct
icount
;
struct
uart_icount
cnow
;
struct
uart_icount
cnow
;
...
@@ -1078,11 +1078,11 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
...
@@ -1078,11 +1078,11 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
*/
*/
switch
(
cmd
)
{
switch
(
cmd
)
{
case
TIOCGSERIAL
:
case
TIOCGSERIAL
:
ret
=
uart_get_info
(
state
,
(
struct
serial_struct
*
)
arg
);
ret
=
uart_get_info
(
state
,
(
struct
serial_struct
__user
*
)
arg
);
break
;
break
;
case
TIOCSSERIAL
:
case
TIOCSSERIAL
:
ret
=
uart_set_info
(
state
,
(
struct
serial_struct
*
)
arg
);
ret
=
uart_set_info
(
state
,
(
struct
serial_struct
__user
*
)
arg
);
break
;
break
;
case
TIOCSERCONFIG
:
case
TIOCSERCONFIG
:
...
@@ -1112,7 +1112,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
...
@@ -1112,7 +1112,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
break
;
break
;
case
TIOCGICOUNT
:
case
TIOCGICOUNT
:
ret
=
uart_get_count
(
state
,
(
struct
serial_icounter_struct
*
)
arg
);
ret
=
uart_get_count
(
state
,
(
struct
serial_icounter_struct
__user
*
)
arg
);
break
;
break
;
}
}
...
@@ -1132,7 +1132,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
...
@@ -1132,7 +1132,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
*/
*/
switch
(
cmd
)
{
switch
(
cmd
)
{
case
TIOCSERGETLSR
:
/* Get line status register */
case
TIOCSERGETLSR
:
/* Get line status register */
ret
=
uart_get_lsr_info
(
state
,
(
unsigned
int
*
)
arg
);
ret
=
uart_get_lsr_info
(
state
,
(
unsigned
int
__user
*
)
arg
);
break
;
break
;
default:
{
default:
{
...
...
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