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
bc6567f9
Commit
bc6567f9
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: DAC960 annotation
parent
5bd049f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
drivers/block/DAC960.c
drivers/block/DAC960.c
+12
-10
drivers/block/DAC960.h
drivers/block/DAC960.h
+5
-5
No files found.
drivers/block/DAC960.c
View file @
bc6567f9
...
@@ -97,7 +97,8 @@ static int DAC960_ioctl(struct inode *inode, struct file *file,
...
@@ -97,7 +97,8 @@ static int DAC960_ioctl(struct inode *inode, struct file *file,
struct
gendisk
*
disk
=
inode
->
i_bdev
->
bd_disk
;
struct
gendisk
*
disk
=
inode
->
i_bdev
->
bd_disk
;
DAC960_Controller_T
*
p
=
disk
->
queue
->
queuedata
;
DAC960_Controller_T
*
p
=
disk
->
queue
->
queuedata
;
int
drive_nr
=
(
long
)
disk
->
private_data
;
int
drive_nr
=
(
long
)
disk
->
private_data
;
struct
hd_geometry
g
,
*
loc
=
(
struct
hd_geometry
*
)
arg
;
struct
hd_geometry
g
;
struct
hd_geometry
__user
*
loc
=
(
struct
hd_geometry
__user
*
)
arg
;
if
(
cmd
!=
HDIO_GETGEO
||
!
loc
)
if
(
cmd
!=
HDIO_GETGEO
||
!
loc
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -6455,7 +6456,8 @@ static int DAC960_ProcReadUserCommand(char *Page, char **Start, off_t Offset,
...
@@ -6455,7 +6456,8 @@ static int DAC960_ProcReadUserCommand(char *Page, char **Start, off_t Offset,
DAC960_ProcWriteUserCommand implements writing /proc/rd/cN/user_command.
DAC960_ProcWriteUserCommand implements writing /proc/rd/cN/user_command.
*/
*/
static
int
DAC960_ProcWriteUserCommand
(
struct
file
*
file
,
const
char
*
Buffer
,
static
int
DAC960_ProcWriteUserCommand
(
struct
file
*
file
,
const
char
__user
*
Buffer
,
unsigned
long
Count
,
void
*
Data
)
unsigned
long
Count
,
void
*
Data
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
Data
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
Data
;
...
@@ -6543,8 +6545,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
...
@@ -6543,8 +6545,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
return
DAC960_ControllerCount
;
return
DAC960_ControllerCount
;
case
DAC960_IOCTL_GET_CONTROLLER_INFO
:
case
DAC960_IOCTL_GET_CONTROLLER_INFO
:
{
{
DAC960_ControllerInfo_T
*
UserSpaceControllerInfo
=
DAC960_ControllerInfo_T
__user
*
UserSpaceControllerInfo
=
(
DAC960_ControllerInfo_T
*
)
Argument
;
(
DAC960_ControllerInfo_T
__user
*
)
Argument
;
DAC960_ControllerInfo_T
ControllerInfo
;
DAC960_ControllerInfo_T
ControllerInfo
;
DAC960_Controller_T
*
Controller
;
DAC960_Controller_T
*
Controller
;
int
ControllerNumber
;
int
ControllerNumber
;
...
@@ -6574,8 +6576,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
...
@@ -6574,8 +6576,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
}
}
case
DAC960_IOCTL_V1_EXECUTE_COMMAND
:
case
DAC960_IOCTL_V1_EXECUTE_COMMAND
:
{
{
DAC960_V1_UserCommand_T
*
UserSpaceUserCommand
=
DAC960_V1_UserCommand_T
__user
*
UserSpaceUserCommand
=
(
DAC960_V1_UserCommand_T
*
)
Argument
;
(
DAC960_V1_UserCommand_T
__user
*
)
Argument
;
DAC960_V1_UserCommand_T
UserCommand
;
DAC960_V1_UserCommand_T
UserCommand
;
DAC960_Controller_T
*
Controller
;
DAC960_Controller_T
*
Controller
;
DAC960_Command_T
*
Command
=
NULL
;
DAC960_Command_T
*
Command
=
NULL
;
...
@@ -6734,8 +6736,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
...
@@ -6734,8 +6736,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
}
}
case
DAC960_IOCTL_V2_EXECUTE_COMMAND
:
case
DAC960_IOCTL_V2_EXECUTE_COMMAND
:
{
{
DAC960_V2_UserCommand_T
*
UserSpaceUserCommand
=
DAC960_V2_UserCommand_T
__user
*
UserSpaceUserCommand
=
(
DAC960_V2_UserCommand_T
*
)
Argument
;
(
DAC960_V2_UserCommand_T
__user
*
)
Argument
;
DAC960_V2_UserCommand_T
UserCommand
;
DAC960_V2_UserCommand_T
UserCommand
;
DAC960_Controller_T
*
Controller
;
DAC960_Controller_T
*
Controller
;
DAC960_Command_T
*
Command
=
NULL
;
DAC960_Command_T
*
Command
=
NULL
;
...
@@ -6888,8 +6890,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
...
@@ -6888,8 +6890,8 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
}
}
case
DAC960_IOCTL_V2_GET_HEALTH_STATUS
:
case
DAC960_IOCTL_V2_GET_HEALTH_STATUS
:
{
{
DAC960_V2_GetHealthStatus_T
*
UserSpaceGetHealthStatus
=
DAC960_V2_GetHealthStatus_T
__user
*
UserSpaceGetHealthStatus
=
(
DAC960_V2_GetHealthStatus_T
*
)
Argument
;
(
DAC960_V2_GetHealthStatus_T
__user
*
)
Argument
;
DAC960_V2_GetHealthStatus_T
GetHealthStatus
;
DAC960_V2_GetHealthStatus_T
GetHealthStatus
;
DAC960_V2_HealthStatusBuffer_T
HealthStatusBuffer
;
DAC960_V2_HealthStatusBuffer_T
HealthStatusBuffer
;
DAC960_Controller_T
*
Controller
;
DAC960_Controller_T
*
Controller
;
...
...
drivers/block/DAC960.h
View file @
bc6567f9
...
@@ -1914,8 +1914,8 @@ typedef struct DAC960_V1_UserCommand
...
@@ -1914,8 +1914,8 @@ typedef struct DAC960_V1_UserCommand
unsigned
char
ControllerNumber
;
unsigned
char
ControllerNumber
;
DAC960_V1_CommandMailbox_T
CommandMailbox
;
DAC960_V1_CommandMailbox_T
CommandMailbox
;
int
DataTransferLength
;
int
DataTransferLength
;
void
*
DataTransferBuffer
;
void
__user
*
DataTransferBuffer
;
DAC960_V1_DCDB_T
*
DCDB
;
DAC960_V1_DCDB_T
__user
*
DCDB
;
}
}
DAC960_V1_UserCommand_T
;
DAC960_V1_UserCommand_T
;
...
@@ -1948,8 +1948,8 @@ typedef struct DAC960_V2_UserCommand
...
@@ -1948,8 +1948,8 @@ typedef struct DAC960_V2_UserCommand
DAC960_V2_CommandMailbox_T
CommandMailbox
;
DAC960_V2_CommandMailbox_T
CommandMailbox
;
int
DataTransferLength
;
int
DataTransferLength
;
int
RequestSenseLength
;
int
RequestSenseLength
;
void
*
DataTransferBuffer
;
void
__user
*
DataTransferBuffer
;
void
*
RequestSenseBuffer
;
void
__user
*
RequestSenseBuffer
;
}
}
DAC960_V2_UserCommand_T
;
DAC960_V2_UserCommand_T
;
...
@@ -1980,7 +1980,7 @@ DAC960_V2_KernelCommand_T;
...
@@ -1980,7 +1980,7 @@ DAC960_V2_KernelCommand_T;
typedef
struct
DAC960_V2_GetHealthStatus
typedef
struct
DAC960_V2_GetHealthStatus
{
{
unsigned
char
ControllerNumber
;
unsigned
char
ControllerNumber
;
DAC960_V2_HealthStatusBuffer_T
*
HealthStatusBuffer
;
DAC960_V2_HealthStatusBuffer_T
__user
*
HealthStatusBuffer
;
}
}
DAC960_V2_GetHealthStatus_T
;
DAC960_V2_GetHealthStatus_T
;
...
...
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