]> git.baikalelectronics.ru Git - kernel.git/commit
ata: libata-core: fix sloppy parameter type in ata_exec_internal[_sg]()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Wed, 15 Jun 2022 19:38:21 +0000 (22:38 +0300)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Sun, 19 Jun 2022 23:21:57 +0000 (08:21 +0900)
commit6dac1e526d173cc5e7de3cb1ff7b2c5a480493ac
tree2a162d12c8b84fc635730a5280994623abdecd4a
parentfadccffb4efe568c9dbacfca6eabfe147dfb5a53
ata: libata-core: fix sloppy parameter type in ata_exec_internal[_sg]()

Make the 'timeout' parameter to ata_exec_internal_sg() *unsigned int* as
msecs_to_jiffies() that it calls takes just *unsigned int* for the time in
milliseconds. Then follow the suit with ata_exec_internal(), its only
caller; also fix up ata_dev_set_feature(), the only ata_exec_internal()'s
caller  that explicitly passes *unsigned long* variable for timeout...

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/libata-core.c
drivers/ata/libata.h