Skip to content

Commit

Permalink
ata: pata_samsung_cf: make pata_s3c_devchk() return 'bool'
Browse files Browse the repository at this point in the history
pata_s3c_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>
  • Loading branch information
Sergey Shtylyov authored and Damien Le Moal committed Feb 19, 2022
1 parent 1336aa8 commit bba077d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/ata/pata_samsung_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ static void pata_s3c_dev_select(struct ata_port *ap, unsigned int device)
/*
* pata_s3c_devchk - PATA device presence detection
*/
static unsigned int pata_s3c_devchk(struct ata_port *ap,
unsigned int device)
static bool pata_s3c_devchk(struct ata_port *ap, unsigned int device)
{
struct ata_ioports *ioaddr = &ap->ioaddr;
u8 nsect, lbal;
Expand All @@ -329,9 +328,9 @@ static unsigned int pata_s3c_devchk(struct ata_port *ap,
lbal = ata_inb(ap->host, ioaddr->lbal_addr);

if ((nsect == 0x55) && (lbal == 0xaa))
return 1; /* we found a device */
return true; /* we found a device */

return 0; /* nothing found */
return false; /* nothing found */
}

/*
Expand Down

0 comments on commit bba077d

Please sign in to comment.