Message ID | 20200904131402.590055-1-f4bug@amsat.org |
---|---|
Headers | show |
Series | hw/net/e1000e: Remove overwritten/duplicated register handlers | expand |
Philippe Mathieu-Daudé <f4bug@amsat.org> 于2020年9月4日周五 下午9:14写道: > > The STATUS register readop handler is initialized first with > the generic e1000e_mac_readreg() handler: > > 2861 #define e1000e_getreg(x) [x] = e1000e_mac_readreg > 2862 typedef uint32_t (*readops)(E1000ECore *, int); > 2863 static const readops e1000e_macreg_readops[] = { > .... > 2919 e1000e_getreg(STATUS), > > Then overwritten with the specific e1000e_get_status handler: > > 3018 [STATUS] = e1000e_get_status, > > To avoid confusion, remove the overwritten initialization. > > 6f3fbe4ed0 ("net: Introduce e1000e device emulation") > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Li Qiang <liq3ea@gmail.com> > --- > hw/net/e1000e_core.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c > index bcd186cac52..5170e6a4563 100644 > --- a/hw/net/e1000e_core.c > +++ b/hw/net/e1000e_core.c > @@ -2916,7 +2916,6 @@ static const readops e1000e_macreg_readops[] = { > e1000e_getreg(TSYNCRXCTL), > e1000e_getreg(TDH), > e1000e_getreg(LEDCTL), > - e1000e_getreg(STATUS), > e1000e_getreg(TCTL), > e1000e_getreg(TDBAL), > e1000e_getreg(TDLEN), > -- > 2.26.2 > >
Le 04/09/2020 à 15:14, Philippe Mathieu-Daudé a écrit : > The STATUS register readop handler is initialized first with > the generic e1000e_mac_readreg() handler: > > 2861 #define e1000e_getreg(x) [x] = e1000e_mac_readreg > 2862 typedef uint32_t (*readops)(E1000ECore *, int); > 2863 static const readops e1000e_macreg_readops[] = { > .... > 2919 e1000e_getreg(STATUS), > > Then overwritten with the specific e1000e_get_status handler: > > 3018 [STATUS] = e1000e_get_status, > > To avoid confusion, remove the overwritten initialization. > > 6f3fbe4ed0 ("net: Introduce e1000e device emulation") > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > hw/net/e1000e_core.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c > index bcd186cac52..5170e6a4563 100644 > --- a/hw/net/e1000e_core.c > +++ b/hw/net/e1000e_core.c > @@ -2916,7 +2916,6 @@ static const readops e1000e_macreg_readops[] = { > e1000e_getreg(TSYNCRXCTL), > e1000e_getreg(TDH), > e1000e_getreg(LEDCTL), > - e1000e_getreg(STATUS), > e1000e_getreg(TCTL), > e1000e_getreg(TDBAL), > e1000e_getreg(TDLEN), > Applied to my trivial-patches branch. Thanks, Laurent