[PATCH] hw/i386/ich9: add comment explaining an argument to acpi_pcihp_reset call

Ani Sinha posted 1 patch 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210727044546.246363-1-ani@anisinha.ca
Maintainers: Igor Mammedov <imammedo@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>
hw/acpi/ich9.c | 5 +++++
1 file changed, 5 insertions(+)
[PATCH] hw/i386/ich9: add comment explaining an argument to acpi_pcihp_reset call
Posted by Ani Sinha 2 years, 9 months ago
acpi_pcihp_reset() call from ich9/pm_reset() passes an unconditional truth value
as the second argument. Added a commnet here to explain the reason why the
argument is being passed unconditionally.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
---
 hw/acpi/ich9.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 778e27b659..b2e3c46075 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -281,6 +281,11 @@ static void pm_reset(void *opaque)
     pm->smi_en_wmask = ~0;
 
     if (pm->use_acpi_hotplug_bridge) {
+        /*
+         * PCI Express root buses do not support hot-plug, for
+         * details see docs/pcie.txt. Hence, the second argument
+         * is unconditionally true.
+         */
         acpi_pcihp_reset(&pm->acpi_pci_hotplug, true);
     }
 
-- 
2.25.1


Re: [PATCH] hw/i386/ich9: add comment explaining an argument to acpi_pcihp_reset call
Posted by Ani Sinha 2 years, 9 months ago
ping ...

On Tue, 27 Jul 2021, Ani Sinha wrote:

> acpi_pcihp_reset() call from ich9/pm_reset() passes an unconditional truth value
> as the second argument. Added a commnet here to explain the reason why the
> argument is being passed unconditionally.
>
> Signed-off-by: Ani Sinha <ani@anisinha.ca>
> ---
>  hw/acpi/ich9.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index 778e27b659..b2e3c46075 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -281,6 +281,11 @@ static void pm_reset(void *opaque)
>      pm->smi_en_wmask = ~0;
>
>      if (pm->use_acpi_hotplug_bridge) {
> +        /*
> +         * PCI Express root buses do not support hot-plug, for
> +         * details see docs/pcie.txt. Hence, the second argument
> +         * is unconditionally true.
> +         */
>          acpi_pcihp_reset(&pm->acpi_pci_hotplug, true);
>      }
>
> --
> 2.25.1
>
>

Re: [PATCH] hw/i386/ich9: add comment explaining an argument to acpi_pcihp_reset call
Posted by Ani Sinha 2 years, 9 months ago
Ping ...

On Thu, 29 Jul 2021, Ani Sinha wrote:

> ping ...
>
> On Tue, 27 Jul 2021, Ani Sinha wrote:
>
> > acpi_pcihp_reset() call from ich9/pm_reset() passes an unconditional truth value
> > as the second argument. Added a commnet here to explain the reason why the
> > argument is being passed unconditionally.
> >
> > Signed-off-by: Ani Sinha <ani@anisinha.ca>
> > ---
> >  hw/acpi/ich9.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> > index 778e27b659..b2e3c46075 100644
> > --- a/hw/acpi/ich9.c
> > +++ b/hw/acpi/ich9.c
> > @@ -281,6 +281,11 @@ static void pm_reset(void *opaque)
> >      pm->smi_en_wmask = ~0;
> >
> >      if (pm->use_acpi_hotplug_bridge) {
> > +        /*
> > +         * PCI Express root buses do not support hot-plug, for
> > +         * details see docs/pcie.txt. Hence, the second argument
> > +         * is unconditionally true.
> > +         */
> >          acpi_pcihp_reset(&pm->acpi_pci_hotplug, true);
> >      }
> >
> > --
> > 2.25.1
> >
> >
>

Re: [PATCH] hw/i386/ich9: add comment explaining an argument to acpi_pcihp_reset call
Posted by Michael S. Tsirkin 2 years, 9 months ago
On Tue, Jul 27, 2021 at 10:15:46AM +0530, Ani Sinha wrote:
> acpi_pcihp_reset() call from ich9/pm_reset() passes an unconditional truth value
> as the second argument. Added a commnet here to explain the reason why the
> argument is being passed unconditionally.
> 
> Signed-off-by: Ani Sinha <ani@anisinha.ca>
> ---
>  hw/acpi/ich9.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index 778e27b659..b2e3c46075 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -281,6 +281,11 @@ static void pm_reset(void *opaque)
>      pm->smi_en_wmask = ~0;
>  
>      if (pm->use_acpi_hotplug_bridge) {
> +        /*
> +         * PCI Express root buses do not support hot-plug, for
> +         * details see docs/pcie.txt. Hence, the second argument
> +         * is unconditionally true.
> +         */
>          acpi_pcihp_reset(&pm->acpi_pci_hotplug, true);
>      }


I don't see this comment as especially elluminating, sorry.

>  
> -- 
> 2.25.1


Re: [PATCH] hw/i386/ich9: add comment explaining an argument to acpi_pcihp_reset call
Posted by Ani Sinha 2 years, 9 months ago

On Tue, 3 Aug 2021, Michael S. Tsirkin wrote:

> On Tue, Jul 27, 2021 at 10:15:46AM +0530, Ani Sinha wrote:
> > acpi_pcihp_reset() call from ich9/pm_reset() passes an unconditional truth value
> > as the second argument. Added a commnet here to explain the reason why the
> > argument is being passed unconditionally.
> >
> > Signed-off-by: Ani Sinha <ani@anisinha.ca>
> > ---
> >  hw/acpi/ich9.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> > index 778e27b659..b2e3c46075 100644
> > --- a/hw/acpi/ich9.c
> > +++ b/hw/acpi/ich9.c
> > @@ -281,6 +281,11 @@ static void pm_reset(void *opaque)
> >      pm->smi_en_wmask = ~0;
> >
> >      if (pm->use_acpi_hotplug_bridge) {
> > +        /*
> > +         * PCI Express root buses do not support hot-plug, for
> > +         * details see docs/pcie.txt. Hence, the second argument
> > +         * is unconditionally true.
> > +         */
> >          acpi_pcihp_reset(&pm->acpi_pci_hotplug, true);
> >      }
>
>
> I don't see this comment as especially elluminating, sorry.

Ok fine. I do not feel strongly about this one either.

Ani