Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci CID 1328433: Anding with 0 and comparing != 0 wi...



details:   https://anonhg.NetBSD.org/src/rev/2f30b08b5776
branches:  trunk
changeset: 341149:2f30b08b5776
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 21 14:11:07 2015 +0000

description:
CID 1328433: Anding with 0 and comparing != 0 will not work very will.

diffstat:

 sys/dev/pci/agp_i810.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 452f12330943 -r 2f30b08b5776 sys/dev/pci/agp_i810.c
--- a/sys/dev/pci/agp_i810.c    Wed Oct 21 13:43:49 2015 +0000
+++ b/sys/dev/pci/agp_i810.c    Wed Oct 21 14:11:07 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp_i810.c,v 1.119 2015/10/13 12:17:04 riastradh Exp $ */
+/*     $NetBSD: agp_i810.c,v 1.120 2015/10/21 14:11:07 christos Exp $  */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.119 2015/10/13 12:17:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.120 2015/10/21 14:11:07 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -445,7 +445,7 @@
         */
        mmadr_type = pci_mapreg_type(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
            mmadr_bar);
-       if ((mmadr_type & PCI_MAPREG_TYPE_MEM) != PCI_MAPREG_TYPE_MEM) {
+       if (PCI_MAPREG_TYPE(mmaddr_type) != PCI_MAPREG_TYPE_MEM) {
                aprint_error_dev(self, "non-memory device MMIO registers\n");
                error = ENXIO;
                goto fail1;



Home | Main Index | Thread Index | Old Index