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: Don't use a cast for upcasting.
details: https://anonhg.NetBSD.org/src/rev/c1eb8e2f9176
branches: trunk
changeset: 365212:c1eb8e2f9176
user: uwe <uwe%NetBSD.org@localhost>
date: Wed Apr 13 22:41:17 2022 +0000
description:
virtio_pci: Don't use a cast for upcasting.
Same object code is generated.
diffstat:
sys/dev/pci/virtio_pci.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r e6c845338a72 -r c1eb8e2f9176 sys/dev/pci/virtio_pci.c
--- a/sys/dev/pci/virtio_pci.c Wed Apr 13 22:20:42 2022 +0000
+++ b/sys/dev/pci/virtio_pci.c Wed Apr 13 22:41:17 2022 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index