summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authoruwe <uwe@NetBSD.org>2022-04-13 22:41:17 +0000
committeruwe <uwe@NetBSD.org>2022-04-13 22:41:17 +0000
commit893805f6d090aeb49e449f61b321c24e706d29ea (patch)
treeeabb88e1a0b192651feec8117a46f06d08e64cef /sys/dev
parenta58b1cc9d29344a65d0562db8e1ee4a02b9ebf37 (diff)
virtio_pci: Don't use a cast for upcasting.
Same object code is generated.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/virtio_pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c
index 79318dab964..d1f31078efd 100644
--- a/sys/dev/pci/virtio_pci.c
+++ b/sys/dev/pci/virtio_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_pci.c,v 1.36 2022/03/17 23:05:01 uwe Exp $ */
+/* $NetBSD: virtio_pci.c,v 1.37 2022/04/13 22:41:17 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.36 2022/03/17 23:05:01 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.37 2022/04/13 22:41:17 uwe Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -588,8 +588,8 @@ virtio_pci_kick_09(struct virtio_softc *sc, uint16_t idx)
static int
virtio_pci_adjust_config_region(struct virtio_pci_softc *psc)
{
- struct virtio_softc * const sc = (struct virtio_softc *) psc;
- device_t self = psc->sc_sc.sc_dev;
+ struct virtio_softc * const sc = &psc->sc_sc;
+ device_t self = sc->sc_dev;
if (psc->sc_sc.sc_version_1)
return 0;