projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master'
[powerpc.git]
/
drivers
/
ide
/
ide-taskfile.c
diff --git
a/drivers/ide/ide-taskfile.c
b/drivers/ide/ide-taskfile.c
index
ace8eda
..
54f9639
100644
(file)
--- a/
drivers/ide/ide-taskfile.c
+++ b/
drivers/ide/ide-taskfile.c
@@
-161,8
+161,6
@@
ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
return ide_stopped;
}
return ide_stopped;
}
-EXPORT_SYMBOL(do_rw_taskfile);
-
/*
* set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd.
*/
/*
* set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd.
*/
@@
-528,9
+526,8
@@
int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
// printk("IDE Taskfile ...\n");
// printk("IDE Taskfile ...\n");
- req_task = k
m
alloc(tasksize, GFP_KERNEL);
+ req_task = k
z
alloc(tasksize, GFP_KERNEL);
if (req_task == NULL) return -ENOMEM;
if (req_task == NULL) return -ENOMEM;
- memset(req_task, 0, tasksize);
if (copy_from_user(req_task, buf, tasksize)) {
kfree(req_task);
return -EFAULT;
if (copy_from_user(req_task, buf, tasksize)) {
kfree(req_task);
return -EFAULT;
@@
-541,12
+538,11
@@
int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
if (taskout) {
int outtotal = tasksize;
if (taskout) {
int outtotal = tasksize;
- outbuf = k
m
alloc(taskout, GFP_KERNEL);
+ outbuf = k
z
alloc(taskout, GFP_KERNEL);
if (outbuf == NULL) {
err = -ENOMEM;
goto abort;
}
if (outbuf == NULL) {
err = -ENOMEM;
goto abort;
}
- memset(outbuf, 0, taskout);
if (copy_from_user(outbuf, buf + outtotal, taskout)) {
err = -EFAULT;
goto abort;
if (copy_from_user(outbuf, buf + outtotal, taskout)) {
err = -EFAULT;
goto abort;
@@
-555,12
+551,11
@@
int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
if (taskin) {
int intotal = tasksize + taskout;
if (taskin) {
int intotal = tasksize + taskout;
- inbuf = k
m
alloc(taskin, GFP_KERNEL);
+ inbuf = k
z
alloc(taskin, GFP_KERNEL);
if (inbuf == NULL) {
err = -ENOMEM;
goto abort;
}
if (inbuf == NULL) {
err = -ENOMEM;
goto abort;
}
- memset(inbuf, 0, taskin);
if (copy_from_user(inbuf, buf + intotal, taskin)) {
err = -EFAULT;
goto abort;
if (copy_from_user(inbuf, buf + intotal, taskin)) {
err = -EFAULT;
goto abort;
@@
-649,10
+644,8
@@
int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
}
abort:
kfree(req_task);
}
abort:
kfree(req_task);
- if (outbuf != NULL)
- kfree(outbuf);
- if (inbuf != NULL)
- kfree(inbuf);
+ kfree(outbuf);
+ kfree(inbuf);
// printk("IDE Taskfile ioctl ended. rc = %i\n", err);
// printk("IDE Taskfile ioctl ended. rc = %i\n", err);
@@
-709,10
+702,9
@@
int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
if (args[3]) {
argsize = 4 + (SECTOR_WORDS * 4 * args[3]);
if (args[3]) {
argsize = 4 + (SECTOR_WORDS * 4 * args[3]);
- argbuf = k
m
alloc(argsize, GFP_KERNEL);
+ argbuf = k
z
alloc(argsize, GFP_KERNEL);
if (argbuf == NULL)
return -ENOMEM;
if (argbuf == NULL)
return -ENOMEM;
- memcpy(argbuf, args, 4);
}
if (set_transfer(drive, &tfargs)) {
xfer_rate = args[1];
}
if (set_transfer(drive, &tfargs)) {
xfer_rate = args[1];