Message ID | 20230122170724.21868-3-shentey@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ACPI controller cleanup | expand |
On Sun, 22 Jan 2023 18:07:19 +0100 Bernhard Beschow <shentey@gmail.com> wrote: > The first thing ich9_pm_iospace_update() does is to set pm->pm_io_base to > the pm_io_base parameter. try to explain why 'pm->pm_io_base = 0' was there , what's changed and then why it's no longer needed. > The pm_io_base parameter's value is the old > one of pm->pm_io_base. I can't parse this sentence. fixes: cacaab8bdd7460 > > Signed-off-by: Bernhard Beschow <shentey@gmail.com> > --- > hw/acpi/ich9.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c > index 2050af67b9..0313e71e74 100644 > --- a/hw/acpi/ich9.c > +++ b/hw/acpi/ich9.c > @@ -136,9 +136,7 @@ void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base) > static int ich9_pm_post_load(void *opaque, int version_id) > { > ICH9LPCPMRegs *pm = opaque; > - uint32_t pm_io_base = pm->pm_io_base; > - pm->pm_io_base = 0; > - ich9_pm_iospace_update(pm, pm_io_base); > + ich9_pm_iospace_update(pm, pm->pm_io_base); > return 0; > } >
Am 24. Januar 2023 16:55:37 UTC schrieb Igor Mammedov <imammedo@redhat.com>: >On Sun, 22 Jan 2023 18:07:19 +0100 >Bernhard Beschow <shentey@gmail.com> wrote: > >> The first thing ich9_pm_iospace_update() does is to set pm->pm_io_base to >> the pm_io_base parameter. >try to explain why 'pm->pm_io_base = 0' was there , what's changed >and then why it's no longer needed. Meanwhile I think the whole function is a no-op and can be removed. Some archeology will explain how it came to be. > >> The pm_io_base parameter's value is the old >> one of pm->pm_io_base. >I can't parse this sentence. > > >fixes: cacaab8bdd7460 > >> >> Signed-off-by: Bernhard Beschow <shentey@gmail.com> >> --- >> hw/acpi/ich9.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c >> index 2050af67b9..0313e71e74 100644 >> --- a/hw/acpi/ich9.c >> +++ b/hw/acpi/ich9.c >> @@ -136,9 +136,7 @@ void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base) >> static int ich9_pm_post_load(void *opaque, int version_id) >> { >> ICH9LPCPMRegs *pm = opaque; >> - uint32_t pm_io_base = pm->pm_io_base; >> - pm->pm_io_base = 0; >> - ich9_pm_iospace_update(pm, pm_io_base); >> + ich9_pm_iospace_update(pm, pm->pm_io_base); >> return 0; >> } >> >
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 2050af67b9..0313e71e74 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -136,9 +136,7 @@ void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base) static int ich9_pm_post_load(void *opaque, int version_id) { ICH9LPCPMRegs *pm = opaque; - uint32_t pm_io_base = pm->pm_io_base; - pm->pm_io_base = 0; - ich9_pm_iospace_update(pm, pm_io_base); + ich9_pm_iospace_update(pm, pm->pm_io_base); return 0; }
The first thing ich9_pm_iospace_update() does is to set pm->pm_io_base to the pm_io_base parameter. The pm_io_base parameter's value is the old one of pm->pm_io_base. Signed-off-by: Bernhard Beschow <shentey@gmail.com> --- hw/acpi/ich9.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)