ata: libata-core: Refactor force_tbl definition
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 18 Mar 2022 04:09:22 +0000 (13:09 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 9 May 2022 11:42:36 +0000 (20:42 +0900)
commit168af4afd1fce013f677b224180a19e33bd7d40f
tree38c28c32d3526c89c4005ca6a5db69b96dff2fbc
parentef1429c0da2656e97b77066a5032ec238b4ead03
ata: libata-core: Refactor force_tbl definition

Introduce the macro definitions force_cbl(), force_spd_limit(),
force_xfer(), force_lflag(), force_horkage_on() and
force_horkage_onoff() to define with a more compact syntax the struct
ata_force_param entries in the force_tbl array defined in the function
ata_parse_force_one().

To reduce the indentation of the array declaration, force_tbl definition
is also moved out of the ata_parse_force_one() function. The entries are
also reordered to group them by type of the quirck that is applied.

Finally, fix a comment in ata_parse_force_param() incorrectly
referencing force_tbl instead of ata_force_tbl.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/ata/libata-core.c