Commit e07bc7096424b977e53a16d72ec02645389107ba
1 parent
c0bc113373
Exists in
master
and in
4 other branches
[PATCH] ide: remove dead code from flagged_taskfile()
flagged_taskfile() is called from execute_drive_cmd() (the only user) only if args->tf_out_flags.all != 0. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Showing 2 changed files with 7 additions and 11 deletions Side-by-side Diff
drivers/ide/ide-taskfile.c
... | ... | @@ -773,19 +773,13 @@ |
773 | 773 | } |
774 | 774 | |
775 | 775 | /* |
776 | - * (ks) Check taskfile in/out flags. | |
776 | + * (ks) Check taskfile in flags. | |
777 | 777 | * If set, then execute as it is defined. |
778 | 778 | * If not set, then define default settings. |
779 | 779 | * The default values are: |
780 | - * write and read all taskfile registers (except data) | |
781 | - * write and read the hob registers (sector,nsector,lcyl,hcyl) | |
780 | + * read all taskfile registers (except data) | |
781 | + * read the hob registers (sector, nsector, lcyl, hcyl) | |
782 | 782 | */ |
783 | - if (task->tf_out_flags.all == 0) { | |
784 | - task->tf_out_flags.all = IDE_TASKFILE_STD_OUT_FLAGS; | |
785 | - if (drive->addressing == 1) | |
786 | - task->tf_out_flags.all |= (IDE_HOB_STD_OUT_FLAGS << 8); | |
787 | - } | |
788 | - | |
789 | 783 | if (task->tf_in_flags.all == 0) { |
790 | 784 | task->tf_in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; |
791 | 785 | if (drive->addressing == 1) |
include/linux/hdreg.h
... | ... | @@ -80,10 +80,12 @@ |
80 | 80 | /* |
81 | 81 | * Define standard taskfile in/out register |
82 | 82 | */ |
83 | -#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE | |
84 | 83 | #define IDE_TASKFILE_STD_IN_FLAGS 0xFE |
85 | -#define IDE_HOB_STD_OUT_FLAGS 0x3C | |
86 | 84 | #define IDE_HOB_STD_IN_FLAGS 0x3C |
85 | +#ifndef __KERNEL__ | |
86 | +#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE | |
87 | +#define IDE_HOB_STD_OUT_FLAGS 0x3C | |
88 | +#endif | |
87 | 89 | |
88 | 90 | typedef unsigned char task_ioreg_t; |
89 | 91 | typedef unsigned long sata_ioreg_t; |