[PULL 28/33] ppc/pegasos2: Fix use of && instead of &

David Gibson posted 33 patches 4 years, 7 months ago
Maintainers: Laurent Vivier <lvivier@redhat.com>, Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Greg Kurz <groug@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, "Michael S. Tsirkin" <mst@redhat.com>, Alexey Kardashevskiy <aik@ozlabs.ru>, BALATON Zoltan <balaton@eik.bme.hu>
[PULL 28/33] ppc/pegasos2: Fix use of && instead of &
Posted by David Gibson 4 years, 7 months ago
This is obviously intended to be a mask, not a logical operation.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/pegasos2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
index f1741a4512..cf1dc53c83 100644
--- a/hw/ppc/pegasos2.c
+++ b/hw/ppc/pegasos2.c
@@ -584,7 +584,7 @@ static void add_pci_device(PCIBus *bus, PCIDevice *d, void *opaque)
                           pci_get_word(&d->config[PCI_SUBSYSTEM_VENDOR_ID]));
     cells[0] = pci_get_long(&d->config[PCI_CLASS_REVISION]);
     qemu_fdt_setprop_cell(fi->fdt, node->str, "class-code", cells[0] >> 8);
-    qemu_fdt_setprop_cell(fi->fdt, node->str, "revision-id", cells[0] && 0xff);
+    qemu_fdt_setprop_cell(fi->fdt, node->str, "revision-id", cells[0] & 0xff);
     qemu_fdt_setprop_cell(fi->fdt, node->str, "device-id",
                           pci_get_word(&d->config[PCI_DEVICE_ID]));
     qemu_fdt_setprop_cell(fi->fdt, node->str, "vendor-id",
-- 
2.31.1