diff options
| author | uwe <uwe@NetBSD.org> | 2022-04-24 11:51:09 +0000 |
|---|---|---|
| committer | uwe <uwe@NetBSD.org> | 2022-04-24 11:51:09 +0000 |
| commit | 2ca79516df19cad920bb67833224ce87fc5d16c4 (patch) | |
| tree | 8735df424988493824a013f915ea30006369a2c8 /sys/dev | |
| parent | 492a505250987f9c228be3930e7da437f52ce0a0 (diff) | |
virtio: cosmetics - use (*pfn)(...) syntax.
Some people prefer to call function pointers without an explicit
dereference (that is purely cosmetic in this position), especially to
create faux c++ s->pfn(...) with function pointers in struct members.
Some prefer explicit dereference (that requires parens around it).
(pfn)(...) without dereference but with parens looks odd to both, so
make it conform to one of the established alternatives.
Same object code is generated.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/virtio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/virtio.c b/sys/dev/pci/virtio.c index ffc146e8e89..2fae6e14f47 100644 --- a/sys/dev/pci/virtio.c +++ b/sys/dev/pci/virtio.c @@ -1,4 +1,4 @@ -/* $NetBSD: virtio.c,v 1.53 2021/10/28 01:36:43 yamaguchi Exp $ */ +/* $NetBSD: virtio.c,v 1.54 2022/04/24 11:51:09 uwe Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.53 2021/10/28 01:36:43 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.54 2022/04/24 11:51:09 uwe Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -413,7 +413,7 @@ virtio_soft_intr(void *arg) KASSERT(sc->sc_intrhand != NULL); - (sc->sc_intrhand)(sc); + (*sc->sc_intrhand)(sc); } /* @@ -496,7 +496,7 @@ virtio_vq_intr(struct virtio_softc *sc) vq = &sc->sc_vqs[i]; if (virtio_vq_is_enqueued(sc, vq) == 1) { if (vq->vq_done) - r |= (vq->vq_done)(vq); + r |= (*vq->vq_done)(vq); } } @@ -511,7 +511,7 @@ virtio_vq_intrhand(struct virtio_softc *sc) for (i = 0; i < sc->sc_nvqs; i++) { vq = &sc->sc_vqs[i]; - r |= (vq->vq_intrhand)(vq->vq_intrhand_arg); + r |= (*vq->vq_intrhand)(vq->vq_intrhand_arg); } return r; @@ -1293,7 +1293,7 @@ virtio_child(struct virtio_softc *sc) int virtio_intrhand(struct virtio_softc *sc) { - return (sc->sc_intrhand)(sc); + return (*sc->sc_intrhand)(sc); } uint64_t |
