ide: task_error() -> task_error_cmd()

* Move ide_error() call from task_error() to task_pio_intr()
  (the only user).

* Drop no longer used arguments from task_error().

* Rename task_error() to ide_error_cmd().

There should be no functional changes caused by this patch.
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 0a1248c5
...@@ -280,8 +280,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct ide_cmd *cmd, ...@@ -280,8 +280,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct ide_cmd *cmd,
drive->io_32bit = saved_io_32bit; drive->io_32bit = saved_io_32bit;
} }
static ide_startstop_t task_error(ide_drive_t *drive, struct ide_cmd *cmd, static void ide_error_cmd(ide_drive_t *drive, struct ide_cmd *cmd)
const char *s, u8 stat)
{ {
if (cmd->tf_flags & IDE_TFLAG_FS) { if (cmd->tf_flags & IDE_TFLAG_FS) {
int sectors = cmd->nsect - cmd->nleft; int sectors = cmd->nsect - cmd->nleft;
...@@ -297,7 +296,6 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct ide_cmd *cmd, ...@@ -297,7 +296,6 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct ide_cmd *cmd,
if (sectors > 0) if (sectors > 0)
ide_end_request(drive, 1, sectors); ide_end_request(drive, 1, sectors);
} }
return ide_error(drive, s, stat);
} }
void ide_finish_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat) void ide_finish_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat)
...@@ -368,7 +366,8 @@ static ide_startstop_t task_pio_intr(ide_drive_t *drive) ...@@ -368,7 +366,8 @@ static ide_startstop_t task_pio_intr(ide_drive_t *drive)
ide_finish_cmd(drive, cmd, stat); ide_finish_cmd(drive, cmd, stat);
return ide_stopped; return ide_stopped;
out_err: out_err:
return task_error(drive, cmd, __func__, stat); ide_error_cmd(drive, cmd);
return ide_error(drive, __func__, stat);
} }
static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, static ide_startstop_t pre_task_out_intr(ide_drive_t *drive,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册