Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci bge(4): use a local variable to make bge_ifmedia...
details: https://anonhg.NetBSD.org/src/rev/df43382526dc
branches: trunk
changeset: 369848:df43382526dc
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Sep 04 08:42:02 2022 +0000
description:
bge(4): use a local variable to make bge_ifmedia initialization pretty.
NFC
diffstat:
sys/dev/pci/if_bge.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (40 lines):
diff -r 40fed467e22b -r df43382526dc sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Sat Sep 03 20:29:30 2022 +0000
+++ b/sys/dev/pci/if_bge.c Sun Sep 04 08:42:02 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.384 2022/08/27 06:32:53 skrll Exp $ */
+/* $NetBSD: if_bge.c,v 1.385 2022/09/04 08:42:02 skrll Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.384 2022/08/27 06:32:53 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.385 2022/09/04 08:42:02 skrll Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -3941,14 +3941,14 @@
macmode | BGE_PORTMODE_TBI);
DELAY(40);
- sc->ethercom.ec_ifmedia = &sc->bge_ifmedia;
- ifmedia_init(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd,
+ struct ifmedia * const ifm = &sc->bge_ifmedia;
+ sc->ethercom.ec_ifmedia = ifm;
+ ifmedia_init(ifm, IFM_IMASK, bge_ifmedia_upd,
bge_ifmedia_sts);
- ifmedia_add(&sc->bge_ifmedia, IFM_ETHER |IFM_1000_SX, 0, NULL);
- ifmedia_add(&sc->bge_ifmedia, IFM_ETHER | IFM_1000_SX |IFM_FDX,
- 0, NULL);
- ifmedia_add(&sc->bge_ifmedia, IFM_ETHER | IFM_AUTO, 0, NULL);
- ifmedia_set(&sc->bge_ifmedia, IFM_ETHER | IFM_AUTO);
+ ifmedia_add(ifm, IFM_ETHER | IFM_1000_SX, 0, NULL);
+ ifmedia_add(ifm, IFM_ETHER | IFM_1000_SX | IFM_FDX, 0, NULL);
+ ifmedia_add(ifm, IFM_ETHER | IFM_AUTO, 0, NULL);
+ ifmedia_set(ifm, IFM_ETHER | IFM_AUTO);
/* Pretend the user requested this setting */
sc->bge_ifmedia.ifm_media = sc->bge_ifmedia.ifm_cur->ifm_media;
} else {
Home |
Main Index |
Thread Index |
Old Index