ata: libata-sff: refactor ata_sff_set_devctl()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Sun, 13 Feb 2022 15:10:31 +0000 (18:10 +0300)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Sat, 19 Feb 2022 02:18:49 +0000 (11:18 +0900)
commit4fc5f0aa9712418dcb12c446a904a359e5568659
tree7b88a031f50deff70ecae71de1a0e25ddc686e19
parentb51aa532e105722d0dfb21718f0b32780c9e8e8d
ata: libata-sff: refactor ata_sff_set_devctl()

Commit 41dec29bcb05 ("libata: introduce sff_set_devctl() method") left some
clumsy checks surrounding calls to ata_sff_set_devctl() which Jeff Garzik
suggested to factor out...  and I never followed up. :-(

At last, refactor ata_sff_set_devctl() to include the repetitive checks and
return a 'bool' result indicating if the device control register exists or
not.

While at it, further update the 'kernel-doc' comment -- the device control
register has never been a part of the taskfile, despite what Jeff and co.
think! :-)

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/libata-sff.c