All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dwc_ahsata: use bitwise operator in sata_port_status
Date: Tue, 28 Oct 2014 19:20:18 +0100	[thread overview]
Message-ID: <544FDE62.30801@myspectrum.nl> (raw)
In-Reply-To: <1414501169-24947-1-git-send-email-nikita@compulab.co.il>

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

  reply	other threads:[~2014-10-28 18:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-10-28 22:54 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544FDE62.30801@myspectrum.nl \
    --to=jeroen@myspectrum.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.