diff options
author | Sergey Shtylyov <s.shtylyov@omp.ru> | 2022-02-13 12:50:00 +0100 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-02-19 03:18:49 +0100 |
commit | b51aa532e105722d0dfb21718f0b32780c9e8e8d (patch) | |
tree | dedfca52b111ff33d14fe8a9f4f3cb9ca08309e4 | |
parent | ata: pata_hpt3x2n: disable fast interrupts in prereset() method (diff) | |
download | linux-b51aa532e105722d0dfb21718f0b32780c9e8e8d.tar.xz linux-b51aa532e105722d0dfb21718f0b32780c9e8e8d.zip |
ata: libata-sff: make ata_resources_present() return 'bool'
ata_resources_present() returns 1 if the primary/secondary channel's PCI
resources are present, 0 if not -- the 'bool' type fits somewhat better
here than 'int'...
Use the *= operator, while at it...
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
-rw-r--r-- | drivers/ata/libata-sff.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 546b1f73ede5..f5e4cd046055 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -2174,18 +2174,18 @@ EXPORT_SYMBOL_GPL(ata_sff_std_ports); #ifdef CONFIG_PCI -static int ata_resources_present(struct pci_dev *pdev, int port) +static bool ata_resources_present(struct pci_dev *pdev, int port) { int i; /* Check the PCI resources for this channel are enabled */ - port = port * 2; + port *= 2; for (i = 0; i < 2; i++) { if (pci_resource_start(pdev, port + i) == 0 || pci_resource_len(pdev, port + i) == 0) - return 0; + return false; } - return 1; + return true; } /** |