* [U-Boot] [PATCH] dwc_ahsata: use bitwise operator in sata_port_status
@ 2014-10-28 12:59 Nikita Kiryanov
2014-10-28 18:20 ` Jeroen Hofstee
2014-10-28 22:54 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Nikita Kiryanov @ 2014-10-28 12:59 UTC (permalink / raw)
To: u-boot
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 <jeroen@myspectrum.nl>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
drivers/block/dwc_ahsata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c
index 29f478b..c68fd2f 100644
--- a/drivers/block/dwc_ahsata.c
+++ b/drivers/block/dwc_ahsata.c
@@ -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;
}
/*
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] dwc_ahsata: use bitwise operator in sata_port_status
2014-10-28 12:59 [U-Boot] [PATCH] dwc_ahsata: use bitwise operator in sata_port_status Nikita Kiryanov
@ 2014-10-28 18:20 ` Jeroen Hofstee
2014-10-28 22:54 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Jeroen Hofstee @ 2014-10-28 18:20 UTC (permalink / raw)
To: u-boot
Hello Nikita,
On 28-10-14 13:59, Nikita Kiryanov wrote:
> 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 <jeroen@myspectrum.nl>
> Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
> Cc: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> ---
> drivers/block/dwc_ahsata.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c
> index 29f478b..c68fd2f 100644
> --- a/drivers/block/dwc_ahsata.c
> +++ b/drivers/block/dwc_ahsata.c
> @@ -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 <jeroen@myspectrum.nl>
Regards,
Jeroen
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] dwc_ahsata: use bitwise operator in sata_port_status
2014-10-28 12:59 [U-Boot] [PATCH] dwc_ahsata: use bitwise operator in sata_port_status Nikita Kiryanov
2014-10-28 18:20 ` Jeroen Hofstee
@ 2014-10-28 22:54 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2014-10-28 22:54 UTC (permalink / raw)
To: u-boot
On Tue, Oct 28, 2014 at 02:59:29PM +0200, Nikita Kiryanov wrote:
> 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 <jeroen@myspectrum.nl>
> Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
> Cc: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-28 22:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 12:59 [U-Boot] [PATCH] dwc_ahsata: use bitwise operator in sata_port_status Nikita Kiryanov
2014-10-28 18:20 ` Jeroen Hofstee
2014-10-28 22:54 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox