]> git.baikalelectronics.ru Git - kernel.git/commit
ata: pata_sil680: fix result type of sil680_sel{dev|reg}()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Tue, 12 Apr 2022 17:26:46 +0000 (20:26 +0300)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Wed, 13 Apr 2022 03:42:51 +0000 (12:42 +0900)
commitbd6064369e8fb8bc31896c4ffcea19a930e5094d
treeb2ee0defc6b962eb98fd094eb988257bb837382f
parentdf1661368df8bc6decb36214fcd96b1067dfdae0
ata: pata_sil680: fix result type of sil680_sel{dev|reg}()

sil680_sel{dev|reg}() return a PCI config space address but needlessly
use the *unsigned long* type for that,  whereas the PCI config space
accessors take *int* for the address parameter.  Switch these functions
to returning *int*, updating the local variables at their call sites.
Get rid of the 'base' local variables in these functions, while at it...

Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.

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