Commit bc6567f9 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: DAC960 annotation

parent 5bd049f8
...@@ -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;
......
...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment