[PATCH] ATA: logical-bitwise and confusion in ahci_save_initial_config() - Kernel
This is a discussion on [PATCH] ATA: logical-bitwise and confusion in ahci_save_initial_config() - Kernel ; logical-bitwise & confusion
Signed-off-by: Roel Kluin
---
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 8a49835..1b73307 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -672,7 +672,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
cap &= ~HOST_CAP_NCQ;
}
- if ((cap && HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) ...
-
[PATCH] ATA: logical-bitwise and confusion in ahci_save_initial_config()
logical-bitwise & confusion
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 8a49835..1b73307 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -672,7 +672,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
cap &= ~HOST_CAP_NCQ;
}
- if ((cap && HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
+ if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
dev_printk(KERN_INFO, &pdev->dev,
"controller can't do PMP, turning off CAP_PMP\n");
cap &= ~HOST_CAP_PMP;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-
Re: [PATCH] ATA: logical-bitwise and confusion in ahci_save_initial_config()
Roel Kluin wrote:
> logical-bitwise & confusion
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Tejun Heo
Thanks for spotting this.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-
Re: [PATCH] ATA: logical-bitwise and confusion in ahci_save_initial_config()
Roel Kluin wrote:
> logical-bitwise & confusion
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 8a49835..1b73307 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -672,7 +672,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
> cap &= ~HOST_CAP_NCQ;
> }
>
> - if ((cap && HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
> + if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
> dev_printk(KERN_INFO, &pdev->dev,
> "controller can't do PMP, turning off CAP_PMP\n");
> cap &= ~HOST_CAP_PMP;
applied
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/