Skip to content

Commit 82b8166

Browse files
qianfengrongdamien-lemoal
authored andcommitted
ata: ahci_xgene: Use int type for 'rc' to store error codes
Use int instead of u32 for the 'rc' variable in xgene_ahci_softreset() to store negative error codes returned by ahci_do_softreset(). In xgene_ahci_pmp_softreset(), remove the redundant 'rc' variable and directly return the result of the ahci_do_softreset() call instead. Signed-off-by: Qianfeng Rong <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent 70c1595 commit 82b8166

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/ata/ahci_xgene.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ static int xgene_ahci_pmp_softreset(struct ata_link *link, unsigned int *class,
450450
{
451451
int pmp = sata_srst_pmp(link);
452452
struct ata_port *ap = link->ap;
453-
u32 rc;
454453
void __iomem *port_mmio = ahci_port_base(ap);
455454
u32 port_fbs;
456455

@@ -463,9 +462,7 @@ static int xgene_ahci_pmp_softreset(struct ata_link *link, unsigned int *class,
463462
port_fbs |= pmp << PORT_FBS_DEV_OFFSET;
464463
writel(port_fbs, port_mmio + PORT_FBS);
465464

466-
rc = ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
467-
468-
return rc;
465+
return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
469466
}
470467

471468
/**
@@ -500,7 +497,7 @@ static int xgene_ahci_softreset(struct ata_link *link, unsigned int *class,
500497
u32 port_fbs;
501498
u32 port_fbs_save;
502499
u32 retry = 1;
503-
u32 rc;
500+
int rc;
504501

505502
port_fbs_save = readl(port_mmio + PORT_FBS);
506503

0 commit comments

Comments
 (0)