Module Name: src Committed By: uwe Date: Sun Apr 24 11:51:09 UTC 2022
Modified Files: src/sys/dev/pci: virtio.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/virtio.c diff -u src/sys/dev/pci/virtio.c:1.53 src/sys/dev/pci/virtio.c:1.54 --- src/sys/dev/pci/virtio.c:1.53 Thu Oct 28 01:36:43 2021 +++ src/sys/dev/pci/virtio.c Sun Apr 24 11:51:09 2022 @@ -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 * 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