diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-03-05 02:04:44 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-03-09 15:59:31 +0100 |
commit | 3b6b3a279ad3c32903b0c0fdf3cacf24b02541f2 (patch) | |
tree | 3c75f762436bdc006f32b1f34ad10cff45e51f7e /hw/net/e1000e_core.c | |
parent | 02f7a1644dd140d0036de054cafa62b90bcff9a4 (diff) |
hw/net/e1000: Add readops/writeops typedefs
Express the macreg[] arrays using typedefs.
No logical changes introduced here.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200305010446.17029-2-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/net/e1000e_core.c')
-rw-r--r-- | hw/net/e1000e_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 94ea34dca5..38bdb90114 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -2855,7 +2855,8 @@ e1000e_set_gcr(E1000ECore *core, int index, uint32_t val) } #define e1000e_getreg(x) [x] = e1000e_mac_readreg -static uint32_t (*e1000e_macreg_readops[])(E1000ECore *, int) = { +typedef uint32_t (*readops)(E1000ECore *, int); +static readops e1000e_macreg_readops[] = { e1000e_getreg(PBA), e1000e_getreg(WUFC), e1000e_getreg(MANC), @@ -3061,7 +3062,8 @@ static uint32_t (*e1000e_macreg_readops[])(E1000ECore *, int) = { enum { E1000E_NREADOPS = ARRAY_SIZE(e1000e_macreg_readops) }; #define e1000e_putreg(x) [x] = e1000e_mac_writereg -static void (*e1000e_macreg_writeops[])(E1000ECore *, int, uint32_t) = { +typedef void (*writeops)(E1000ECore *, int, uint32_t); +static writeops e1000e_macreg_writeops[] = { e1000e_putreg(PBA), e1000e_putreg(SWSM), e1000e_putreg(WUFC), |