summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2022-02-09 22:46:30 +0100
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-02-19 03:18:43 +0100
commit88e6b81878fb3fce93a26879164a2b7f5cbc848a (patch)
treea344ca48b2e083ca996bcc49295102fd103457c2 /drivers/ata
parentata: pata_samsung_cf: make pata_s3c_devchk() return 'bool' (diff)
downloadlinux-88e6b81878fb3fce93a26879164a2b7f5cbc848a.tar.xz
linux-88e6b81878fb3fce93a26879164a2b7f5cbc848a.zip
ata: sata_rcar: make sata_rcar_ata_devchk() return 'bool'
sata_rcar_ata_devchk() returns 1 if a device is present, 0 if not -- the 'bool' type clearly fits better here than 'unsigned int'... Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_rcar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index be8bfefed663..20263c1113df 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -283,8 +283,7 @@ static void sata_rcar_dev_select(struct ata_port *ap, unsigned int device)
ata_sff_pause(ap); /* needed; also flushes, for mmio */
}
-static unsigned int sata_rcar_ata_devchk(struct ata_port *ap,
- unsigned int device)
+static bool sata_rcar_ata_devchk(struct ata_port *ap, unsigned int device)
{
struct ata_ioports *ioaddr = &ap->ioaddr;
u8 nsect, lbal;
@@ -304,9 +303,9 @@ static unsigned int sata_rcar_ata_devchk(struct ata_port *ap,
lbal = ioread32(ioaddr->lbal_addr);
if (nsect == 0x55 && lbal == 0xaa)
- return 1; /* found a device */
+ return true; /* found a device */
- return 0; /* nothing found */
+ return false; /* nothing found */
}
static int sata_rcar_wait_after_reset(struct ata_link *link,