Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci virtio_pci.c: use PCI_BAR macro instead of open-...
details: https://anonhg.NetBSD.org/src/rev/d41a21564bb4
branches: trunk
changeset: 363941:d41a21564bb4
user: uwe <uwe%NetBSD.org@localhost>
date: Thu Mar 17 22:53:13 2022 +0000
description:
virtio_pci.c: use PCI_BAR macro instead of open-coding it.
diffstat:
sys/dev/pci/virtio_pci.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r de89b783611f -r d41a21564bb4 sys/dev/pci/virtio_pci.c
--- a/sys/dev/pci/virtio_pci.c Thu Mar 17 22:22:49 2022 +0000
+++ b/sys/dev/pci/virtio_pci.c Thu Mar 17 22:53:13 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_pci.c,v 1.34 2022/03/14 12:22:02 uwe Exp $ */
+/* $NetBSD: virtio_pci.c,v 1.35 2022/03/17 22:53:13 uwe Exp $ */
/*
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.34 2022/03/14 12:22:02 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.35 2022/03/17 22:53:13 uwe Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -439,7 +439,7 @@
pcireg_t type;
if (bars[i] == 0)
continue;
- reg = PCI_MAPREG_START + i * 4;
+ reg = PCI_BAR(i);
type = pci_mapreg_type(pc, tag, reg);
if (pci_mapreg_map(pa, reg, type, 0,
&psc->sc_bars_iot[j], &psc->sc_bars_ioh[j],
Home |
Main Index |
Thread Index |
Old Index