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
fe2a5a14
Commit
fe2a5a14
authored
Jun 03, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: paride annotation
parent
8a2e7a53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
drivers/block/paride/pf.c
drivers/block/paride/pf.c
+1
-1
drivers/block/paride/pg.c
drivers/block/paride/pg.c
+6
-6
drivers/block/paride/pt.c
drivers/block/paride/pt.c
+6
-6
No files found.
drivers/block/paride/pf.c
View file @
fe2a5a14
...
@@ -337,7 +337,7 @@ static int pf_open(struct inode *inode, struct file *file)
...
@@ -337,7 +337,7 @@ static int pf_open(struct inode *inode, struct file *file)
static
int
pf_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
pf_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
pf_unit
*
pf
=
inode
->
i_bdev
->
bd_disk
->
private_data
;
struct
pf_unit
*
pf
=
inode
->
i_bdev
->
bd_disk
->
private_data
;
struct
hd_geometry
*
geo
=
(
struct
hd_geometry
*
)
arg
;
struct
hd_geometry
__user
*
geo
=
(
struct
hd_geometry
__user
*
)
arg
;
struct
hd_geometry
g
;
struct
hd_geometry
g
;
sector_t
capacity
;
sector_t
capacity
;
...
...
drivers/block/paride/pg.c
View file @
fe2a5a14
...
@@ -212,9 +212,9 @@ MODULE_PARM(drive3, "1-6i");
...
@@ -212,9 +212,9 @@ MODULE_PARM(drive3, "1-6i");
static
int
pg_open
(
struct
inode
*
inode
,
struct
file
*
file
);
static
int
pg_open
(
struct
inode
*
inode
,
struct
file
*
file
);
static
int
pg_release
(
struct
inode
*
inode
,
struct
file
*
file
);
static
int
pg_release
(
struct
inode
*
inode
,
struct
file
*
file
);
static
ssize_t
pg_read
(
struct
file
*
filp
,
char
*
buf
,
static
ssize_t
pg_read
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
);
size_t
count
,
loff_t
*
ppos
);
static
ssize_t
pg_write
(
struct
file
*
filp
,
const
char
*
buf
,
static
ssize_t
pg_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
);
size_t
count
,
loff_t
*
ppos
);
static
int
pg_detect
(
void
);
static
int
pg_detect
(
void
);
...
@@ -571,7 +571,7 @@ static int pg_release(struct inode *inode, struct file *file)
...
@@ -571,7 +571,7 @@ static int pg_release(struct inode *inode, struct file *file)
return
0
;
return
0
;
}
}
static
ssize_t
pg_write
(
struct
file
*
filp
,
const
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
pg_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
struct
pg
*
dev
=
filp
->
private_data
;
struct
pg
*
dev
=
filp
->
private_data
;
struct
pg_write_hdr
hdr
;
struct
pg_write_hdr
hdr
;
...
@@ -582,7 +582,7 @@ static ssize_t pg_write(struct file *filp, const char *buf, size_t count, loff_t
...
@@ -582,7 +582,7 @@ static ssize_t pg_write(struct file *filp, const char *buf, size_t count, loff_t
if
(
count
<
hs
)
if
(
count
<
hs
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
copy_from_user
(
(
char
*
)
&
hdr
,
buf
,
hs
))
if
(
copy_from_user
(
&
hdr
,
buf
,
hs
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
hdr
.
magic
!=
PG_MAGIC
)
if
(
hdr
.
magic
!=
PG_MAGIC
)
...
@@ -619,7 +619,7 @@ static ssize_t pg_write(struct file *filp, const char *buf, size_t count, loff_t
...
@@ -619,7 +619,7 @@ static ssize_t pg_write(struct file *filp, const char *buf, size_t count, loff_t
return
count
;
return
count
;
}
}
static
ssize_t
pg_read
(
struct
file
*
filp
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
pg_read
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
struct
pg
*
dev
=
filp
->
private_data
;
struct
pg
*
dev
=
filp
->
private_data
;
struct
pg_read_hdr
hdr
;
struct
pg_read_hdr
hdr
;
...
@@ -651,7 +651,7 @@ static ssize_t pg_read(struct file *filp, char *buf, size_t count, loff_t *ppos)
...
@@ -651,7 +651,7 @@ static ssize_t pg_read(struct file *filp, char *buf, size_t count, loff_t *ppos)
hdr
.
duration
=
(
jiffies
-
dev
->
start
+
HZ
/
2
)
/
HZ
;
hdr
.
duration
=
(
jiffies
-
dev
->
start
+
HZ
/
2
)
/
HZ
;
hdr
.
scsi
=
dev
->
status
&
0x0f
;
hdr
.
scsi
=
dev
->
status
&
0x0f
;
if
(
copy_to_user
(
buf
,
(
char
*
)
&
hdr
,
hs
))
if
(
copy_to_user
(
buf
,
&
hdr
,
hs
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
copy
>
0
)
if
(
copy
>
0
)
if
(
copy_to_user
(
buf
+
hs
,
dev
->
bufptr
,
copy
))
if
(
copy_to_user
(
buf
+
hs
,
dev
->
bufptr
,
copy
))
...
...
drivers/block/paride/pt.c
View file @
fe2a5a14
...
@@ -212,9 +212,9 @@ static int pt_open(struct inode *inode, struct file *file);
...
@@ -212,9 +212,9 @@ static int pt_open(struct inode *inode, struct file *file);
static
int
pt_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
static
int
pt_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
);
unsigned
int
cmd
,
unsigned
long
arg
);
static
int
pt_release
(
struct
inode
*
inode
,
struct
file
*
file
);
static
int
pt_release
(
struct
inode
*
inode
,
struct
file
*
file
);
static
ssize_t
pt_read
(
struct
file
*
filp
,
char
*
buf
,
static
ssize_t
pt_read
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
);
size_t
count
,
loff_t
*
ppos
);
static
ssize_t
pt_write
(
struct
file
*
filp
,
const
char
*
buf
,
static
ssize_t
pt_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
);
size_t
count
,
loff_t
*
ppos
);
static
int
pt_detect
(
void
);
static
int
pt_detect
(
void
);
...
@@ -710,12 +710,12 @@ static int pt_ioctl(struct inode *inode, struct file *file,
...
@@ -710,12 +710,12 @@ static int pt_ioctl(struct inode *inode, struct file *file,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
pt_unit
*
tape
=
file
->
private_data
;
struct
pt_unit
*
tape
=
file
->
private_data
;
struct
mtop
__user
*
p
=
(
void
__user
*
)
arg
;
struct
mtop
mtop
;
struct
mtop
mtop
;
switch
(
cmd
)
{
switch
(
cmd
)
{
case
MTIOCTOP
:
case
MTIOCTOP
:
if
(
copy_from_user
((
char
*
)
&
mtop
,
(
char
*
)
arg
,
if
(
copy_from_user
(
&
mtop
,
p
,
sizeof
(
struct
mtop
)))
sizeof
(
struct
mtop
)))
return
-
EFAULT
;
return
-
EFAULT
;
switch
(
mtop
.
mt_op
)
{
switch
(
mtop
.
mt_op
)
{
...
@@ -764,7 +764,7 @@ pt_release(struct inode *inode, struct file *file)
...
@@ -764,7 +764,7 @@ pt_release(struct inode *inode, struct file *file)
}
}
static
ssize_t
pt_read
(
struct
file
*
filp
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
pt_read
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
struct
pt_unit
*
tape
=
filp
->
private_data
;
struct
pt_unit
*
tape
=
filp
->
private_data
;
struct
pi_adapter
*
pi
=
tape
->
pi
;
struct
pi_adapter
*
pi
=
tape
->
pi
;
...
@@ -861,7 +861,7 @@ static ssize_t pt_read(struct file *filp, char *buf, size_t count, loff_t * ppos
...
@@ -861,7 +861,7 @@ static ssize_t pt_read(struct file *filp, char *buf, size_t count, loff_t * ppos
}
}
static
ssize_t
pt_write
(
struct
file
*
filp
,
const
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
pt_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
struct
pt_unit
*
tape
=
filp
->
private_data
;
struct
pt_unit
*
tape
=
filp
->
private_data
;
struct
pi_adapter
*
pi
=
tape
->
pi
;
struct
pi_adapter
*
pi
=
tape
->
pi
;
...
...
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