dwc_ahsata: use bitwise operator in sata_port_status
PATCH 1/1 dwc_ahsata: use bitwise operator in sata_port_status
The logic of the return statement in sata_port_status() calls for a bitwise 'AND' operator, not logical 'AND'. Fix the typo.
Reported-by Jeroen Hofstee <[email protected]>
Cc Jeroen Hofstee <[email protected]>
Cc Stefano Babic <[email protected]>
Signed-off-by Nikita Kiryanov <[email protected]>
--- drivers/block/dwc_ahsata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/dwc_ahsata.c +1 -1
@@ -878,7 +878,7 @@ int sata_port_status(int dev, int port) probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv; port_mmio = (struct sata_port_regs *)probe_ent->port[port].port_mmio; -return readl (&(port_mmio->ssts)) &&SATA_PORT_SSTS_DET_MASK ; +return readl (&(port_mmio->ssts)) &SATA_PORT_SSTS_DET_MASK ; }/*
Signature · 1 line
1.9.1
PATCH 1/1 dwc_ahsata: use bitwise operator in sata_port_status
Hello Nikita,
Quoted 16 lines · Nikita Kiryanov
The logic of the return statement in
sata_port_status()calls for a bitwise 'AND' operator, not logical 'AND'. Fix the typo.Reported-by Jeroen Hofstee <[email protected]>Cc Jeroen Hofstee <[email protected]>Cc Stefano Babic <[email protected]>Signed-off-by Nikita Kiryanov <[email protected]>--- drivers/block/dwc_ahsata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/block/dwc_ahsata.c +0
-0
drivers/block/dwc_ahsata.c int sata_port_status(int dev, int port) · line 884
Quoted 8 lines
drivers/block/dwc_ahsata.c +1
-1@@ -878,7 +878,7 @@ int sata_port_status(int dev, int port) probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv; port_mmio = (struct sata_port_regs *)probe_ent->port[port].port_mmio; -return readl (&(port_mmio->ssts)) &&SATA_PORT_SSTS_DET_MASK ; +return readl (&(port_mmio->ssts)) &SATA_PORT_SSTS_DET_MASK ; }/*
And squashes a warning ;)
Acked-by Jeroen Hofstee <[email protected]>
Regards,
Jeroen
PATCH 1/1 dwc_ahsata: use bitwise operator in sata_port_status
In reply to Nikita KiryanovQuoted 7 lines · Nikita Kiryanov
The logic of the return statement in
sata_port_status()calls for a bitwise 'AND' operator, not logical 'AND'. Fix the typo.Reported-by Jeroen Hofstee <[email protected]>Cc Jeroen Hofstee <[email protected]>Cc Stefano Babic <[email protected]>Signed-off-by Nikita Kiryanov <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141028/b3d1cb42/attachment.pgp>