Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/pci Make this compilable in non-DIAGNOSTIC kern...
details: https://anonhg.NetBSD.org/src/rev/d53799572007
branches: trunk
changeset: 337796:d53799572007
user: martin <martin%NetBSD.org@localhost>
date: Tue Apr 28 06:23:57 2015 +0000
description:
Make this compilable in non-DIAGNOSTIC kernels.
diffstat:
sys/arch/x86/pci/msipic.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (69 lines):
diff -r 46540068fd65 -r d53799572007 sys/arch/x86/pci/msipic.c
--- a/sys/arch/x86/pci/msipic.c Tue Apr 28 02:56:58 2015 +0000
+++ b/sys/arch/x86/pci/msipic.c Tue Apr 28 06:23:57 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msipic.c,v 1.2 2015/04/28 02:38:53 knakahara Exp $ */
+/* $NetBSD: msipic.c,v 1.3 2015/04/28 06:23:57 martin Exp $ */
/*
* Copyright (c) 2015 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.2 2015/04/28 02:38:53 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.3 2015/04/28 06:23:57 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -322,12 +322,13 @@
struct pci_attach_args *pa;
pcitag_t tag;
pcireg_t ctl;
- int off;
+ int off, err __diagused;
pc = NULL;
pa = &pic->pic_msipic->mp_pa;
tag = pa->pa_tag;
- KASSERT(pci_get_capability(pc, tag, PCI_CAP_MSI, &off, NULL) != 0);
+ err = pci_get_capability(pc, tag, PCI_CAP_MSI, &off, NULL);
+ KASSERT(err != 0);
/*
* MSI can establish only one vector at once.
@@ -368,12 +369,13 @@
struct pci_attach_args *pa;
pcitag_t tag;
pcireg_t addr, data, ctl;
- int off;
+ int off, err __diagused;
pc = NULL;
pa = &pic->pic_msipic->mp_pa;
tag = pa->pa_tag;
- KASSERT(pci_get_capability(pc, tag, PCI_CAP_MSI, &off, NULL) != 0);
+ err = pci_get_capability(pc, tag, PCI_CAP_MSI, &off, NULL);
+ KASSERT(err != 0);
/*
* See Intel 64 and IA-32 Architectures Software Developer's Manual
@@ -527,7 +529,7 @@
bus_space_handle_t bshandle;
uint64_t entry_base;
pcireg_t addr, data, ctl;
- int off;
+ int off, err __diagused;
if (msix_vec < 0) {
DPRINTF(("%s: invalid MSI-X table index, devid=%d vecid=%d",
@@ -538,7 +540,8 @@
pa = &pic->pic_msipic->mp_pa;
pc = pa->pa_pc;
tag = pa->pa_tag;
- KASSERT(pci_get_capability(pc, tag, PCI_CAP_MSIX, &off, NULL) != 0);
+ err = pci_get_capability(pc, tag, PCI_CAP_MSIX, &off, NULL);
+ KASSERT(err != 0);
entry_base = PCI_MSIX_TABLE_ENTRY_SIZE * msix_vec;
Home |
Main Index |
Thread Index |
Old Index