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
8c881385
Commit
8c881385
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: rest of drivers/block annotation
parent
fe2a5a14
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
drivers/block/carmel.c
drivers/block/carmel.c
+1
-1
drivers/block/ps2esdi.c
drivers/block/ps2esdi.c
+8
-8
drivers/block/umem.c
drivers/block/umem.c
+1
-1
drivers/block/xd.c
drivers/block/xd.c
+4
-4
No files found.
drivers/block/carmel.c
View file @
8c881385
...
...
@@ -413,7 +413,7 @@ static unsigned long carm_major_alloc;
static
int
carm_bdev_ioctl
(
struct
inode
*
ino
,
struct
file
*
fil
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
void
__user
*
usermem
=
(
void
*
)
arg
;
void
__user
*
usermem
=
(
void
__user
*
)
arg
;
struct
carm_port
*
port
=
ino
->
i_bdev
->
bd_disk
->
private_data
;
struct
hd_geometry
geom
;
...
...
drivers/block/ps2esdi.c
View file @
8c881385
...
...
@@ -1063,17 +1063,17 @@ static int ps2esdi_ioctl(struct inode *inode,
struct
file
*
file
,
u_int
cmd
,
u_long
arg
)
{
struct
ps2esdi_i_struct
*
p
=
inode
->
i_bdev
->
bd_disk
->
private_data
;
struct
ps2esdi_geometry
*
geometry
=
(
struct
ps2esdi_geometry
*
)
arg
;
int
err
;
struct
ps2esdi_geometry
geom
;
if
(
cmd
!=
HDIO_GETGEO
)
return
-
EINVAL
;
if
((
err
=
verify_area
(
VERIFY_WRITE
,
geometry
,
sizeof
(
*
geometry
))))
return
(
err
);
put_user
(
p
->
head
,
(
char
*
)
&
geometry
->
heads
);
put_user
(
p
->
sect
,
(
char
*
)
&
geometry
->
sectors
);
put_user
(
p
->
cyl
,
(
short
*
)
&
geometry
->
cylinders
);
put_user
(
get_start_sect
(
inode
->
i_bdev
),
(
long
*
)
&
geometry
->
start
);
memset
(
&
geom
,
0
,
sizeof
(
geom
));
geom
.
heads
=
p
->
head
;
geom
.
sectors
=
p
->
sect
;
geom
.
cylinders
=
p
->
cyl
;
geom
.
start
=
get_start_sect
(
inode
->
i_bdev
);
if
(
copy_to_user
((
void
__user
*
)
arg
,
&
geom
,
sizeof
(
geom
)))
return
-
EFAULT
;
return
0
;
}
...
...
drivers/block/umem.c
View file @
8c881385
...
...
@@ -833,7 +833,7 @@ static int mm_ioctl(struct inode *i, struct file *f, unsigned int cmd, unsigned
geo
.
start
=
get_start_sect
(
i
->
i_bdev
);
geo
.
cylinders
=
size
/
(
geo
.
heads
*
geo
.
sectors
);
if
(
copy_to_user
((
void
*
)
arg
,
&
geo
,
sizeof
(
geo
)))
if
(
copy_to_user
((
void
__user
*
)
arg
,
&
geo
,
sizeof
(
geo
)))
return
-
EFAULT
;
return
0
;
}
...
...
drivers/block/xd.c
View file @
8c881385
...
...
@@ -330,12 +330,12 @@ static int xd_ioctl (struct inode *inode,struct file *file,u_int cmd,u_long arg)
case
HDIO_GETGEO
:
{
struct
hd_geometry
g
;
struct
hd_geometry
*
geometry
=
(
struct
hd_geometry
*
)
arg
;
struct
hd_geometry
__user
*
geom
=
(
void
__user
*
)
arg
;
g
.
heads
=
p
->
heads
;
g
.
sectors
=
p
->
sectors
;
g
.
cylinders
=
p
->
cylinders
;
g
.
start
=
get_start_sect
(
inode
->
i_bdev
);
return
copy_to_user
(
geom
etry
,
&
g
,
sizeof
g
)
?
-
EFAULT
:
0
;
return
copy_to_user
(
geom
,
&
g
,
sizeof
(
g
)
)
?
-
EFAULT
:
0
;
}
case
HDIO_SET_DMA
:
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EACCES
;
...
...
@@ -354,9 +354,9 @@ static int xd_ioctl (struct inode *inode,struct file *file,u_int cmd,u_long arg)
}
return
0
;
case
HDIO_GET_DMA
:
return
put_user
(
!
nodma
,
(
long
*
)
arg
);
return
put_user
(
!
nodma
,
(
long
__user
*
)
arg
);
case
HDIO_GET_MULTCOUNT
:
return
put_user
(
xd_maxsectors
,
(
long
*
)
arg
);
return
put_user
(
xd_maxsectors
,
(
long
__user
*
)
arg
);
default:
return
-
EINVAL
;
}
...
...
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