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
8a2e7a53
Commit
8a2e7a53
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: cpqarray annotation
parent
bacd80d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
drivers/block/cpqarray.c
drivers/block/cpqarray.c
+8
-8
drivers/block/ida_ioctl.h
drivers/block/ida_ioctl.h
+1
-1
No files found.
drivers/block/cpqarray.c
View file @
8a2e7a53
...
...
@@ -1157,8 +1157,8 @@ static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
ctlr_info_t
*
host
=
get_host
(
inode
->
i_bdev
->
bd_disk
);
int
error
;
int
diskinfo
[
4
];
struct
hd_geometry
*
geo
=
(
struct
hd_geometry
*
)
arg
;
ida_ioctl_t
*
io
=
(
ida_ioctl_t
*
)
arg
;
struct
hd_geometry
__user
*
geo
=
(
struct
hd_geometry
__user
*
)
arg
;
ida_ioctl_t
__user
*
io
=
(
ida_ioctl_t
__user
*
)
arg
;
ida_ioctl_t
*
my_io
;
switch
(
cmd
)
{
...
...
@@ -1202,7 +1202,7 @@ static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
return
error
;
case
IDAGETCTLRSIG
:
if
(
!
arg
)
return
-
EINVAL
;
put_user
(
host
->
ctlr_sig
,
(
int
*
)
arg
);
put_user
(
host
->
ctlr_sig
,
(
int
__user
*
)
arg
);
return
0
;
case
IDAREVALIDATEVOLS
:
if
(
iminor
(
inode
)
!=
0
)
...
...
@@ -1210,7 +1210,7 @@ static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
return
revalidate_allvol
(
host
);
case
IDADRIVERVERSION
:
if
(
!
arg
)
return
-
EINVAL
;
put_user
(
DRIVER_VERSION
,
(
unsigned
long
*
)
arg
);
put_user
(
DRIVER_VERSION
,
(
unsigned
long
__user
*
)
arg
);
return
0
;
case
IDAGETPCIINFO
:
{
...
...
@@ -1221,7 +1221,7 @@ static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
pciinfo
.
bus
=
host
->
pci_dev
->
bus
->
number
;
pciinfo
.
dev_fn
=
host
->
pci_dev
->
devfn
;
pciinfo
.
board_id
=
host
->
board_id
;
if
(
copy_to_user
((
void
*
)
arg
,
&
pciinfo
,
if
(
copy_to_user
((
void
__user
*
)
arg
,
&
pciinfo
,
sizeof
(
ida_pci_info_struct
)))
return
-
EFAULT
;
return
(
0
);
...
...
@@ -1272,7 +1272,7 @@ static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io)
cmd_free
(
h
,
c
,
0
);
return
(
error
);
}
if
(
copy_from_user
(
p
,
(
void
*
)
io
->
sg
[
0
].
addr
,
io
->
sg
[
0
].
size
))
{
if
(
copy_from_user
(
p
,
io
->
sg
[
0
].
addr
,
io
->
sg
[
0
].
size
))
{
kfree
(
p
);
cmd_free
(
h
,
c
,
0
);
return
-
EFAULT
;
...
...
@@ -1313,7 +1313,7 @@ static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io)
cmd_free
(
h
,
c
,
0
);
return
(
error
);
}
if
(
copy_from_user
(
p
,
(
void
*
)
io
->
sg
[
0
].
addr
,
io
->
sg
[
0
].
size
))
{
if
(
copy_from_user
(
p
,
io
->
sg
[
0
].
addr
,
io
->
sg
[
0
].
size
))
{
kfree
(
p
);
cmd_free
(
h
,
c
,
0
);
return
-
EFAULT
;
...
...
@@ -1354,7 +1354,7 @@ static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io)
case
DIAG_PASS_THRU
:
case
SENSE_CONTROLLER_PERFORMANCE
:
case
READ_FLASH_ROM
:
if
(
copy_to_user
(
(
void
*
)
io
->
sg
[
0
].
addr
,
p
,
io
->
sg
[
0
].
size
))
{
if
(
copy_to_user
(
io
->
sg
[
0
].
addr
,
p
,
io
->
sg
[
0
].
size
))
{
kfree
(
p
);
return
-
EFAULT
;
}
...
...
drivers/block/ida_ioctl.h
View file @
8a2e7a53
...
...
@@ -57,7 +57,7 @@ typedef struct {
/* currently, sg_cnt is assumed to be 1: only the 0th element of sg is used */
struct
{
void
*
addr
;
void
__user
*
addr
;
size_t
size
;
}
sg
[
SG_MAX
];
int
sg_cnt
;
...
...
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