• Sergey Shtylyov's avatar
    ata: libata-sff: refactor ata_sff_altstatus() · 03c0e84f
    Sergey Shtylyov authored
    The driver's calls to ata_sff_altstatus() are mostly surrounded by some
    clumsy checks. Refactor ata_sff_altstatus() to include the repetitive
    checks and return a 'bool' result indicating if the alternate status
    register exists or not.
    
    While at it, further update the 'kernel-doc' comment -- the alternate
    status register has never been a part of the taskfile, despite what
    Jeff and co. think! :-)
    
    In ata_sff_lost_interrupt(), wrap the ata_sff_altstatus() call in a
    WARN_ON_ONCE() check to issue a warning if the device control register
    does not exist. And while at it, fix the strange argument indentation
    in the ata_port_warn() call following the call to ata_sff_altstatus().
    Signed-off-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
    03c0e84f
libata-sff.c 81.8 KB