]> git.baikalelectronics.ru Git - kernel.git/commit
ata: pata_legacy: fix pdc20230_set_piomode()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Fri, 28 Oct 2022 21:07:06 +0000 (00:07 +0300)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 31 Oct 2022 11:27:27 +0000 (20:27 +0900)
commit290cafb631e4373744d13d5e7c68ec5a629738c1
treec79ba4eb7710156cb9995bf2a3973c0a98149ae3
parente42f48082031431882f78795a97528af9df1d87e
ata: pata_legacy: fix pdc20230_set_piomode()

Clang gives a warning when compiling pata_legacy.c with 'make W=1' about
the 'rt' local variable in pdc20230_set_piomode() being set but unused.
Quite obviously, there is an outb() call missing to write back the updated
variable. Moreover, checking the docs by Petr Soucek revealed that bitwise
AND should have been done with a negated timing mask and the master/slave
timing masks were swapped while updating...

Fixes: 1f538e3509a8 ("[libata] Add a bunch of PATA drivers.")
Reported-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/pata_legacy.c