linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: utils: include UUID in _DSM evaluation warning
@ 2022-05-16 17:25 Michael Niewöhner
  2022-05-17 14:49 ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Niewöhner @ 2022-05-16 17:25 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, open list:ACPI, open list

The _DSM evaluation warning in its current form is not very helpful, as 
it lacks any specific information:
  ACPI: \: failed to evaluate _DSM (0x1001)

Thus, include the UUID of the missing _DSM:
  ACPI: \: failed to evaluate _DSM bf0212f2-... (0x1001)

Signed-off-by: Michael Niewöhner <linux@mniewoehner.de>
---
 drivers/acpi/utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index d5cedffeeff9..7da993f5b6c3 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -681,7 +681,8 @@ acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
u64 rev, u64 func,
 
        if (ret != AE_NOT_FOUND)
                acpi_handle_warn(handle,
-                               "failed to evaluate _DSM (0x%x)\n", ret);
+                               "failed to evaluate _DSM %pUb (0x%x)\n",
+                               ret, guid);
 
        return NULL;
 }
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ACPI: utils: include UUID in _DSM evaluation warning
  2022-05-16 17:25 [PATCH] ACPI: utils: include UUID in _DSM evaluation warning Michael Niewöhner
@ 2022-05-17 14:49 ` Rafael J. Wysocki
  2022-05-17 18:25   ` Michael Niewöhner
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2022-05-17 14:49 UTC (permalink / raw)
  To: Michael Niewöhner
  Cc: Rafael J. Wysocki, Len Brown, open list:ACPI, open list

On Mon, May 16, 2022 at 7:25 PM Michael Niewöhner <linux@mniewoehner.de> wrote:
>
> The _DSM evaluation warning in its current form is not very helpful, as
> it lacks any specific information:
>   ACPI: \: failed to evaluate _DSM (0x1001)
>
> Thus, include the UUID of the missing _DSM:
>   ACPI: \: failed to evaluate _DSM bf0212f2-... (0x1001)
>
> Signed-off-by: Michael Niewöhner <linux@mniewoehner.de>
> ---
>  drivers/acpi/utils.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> index d5cedffeeff9..7da993f5b6c3 100644
> --- a/drivers/acpi/utils.c
> +++ b/drivers/acpi/utils.c
> @@ -681,7 +681,8 @@ acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
> u64 rev, u64 func,
>
>         if (ret != AE_NOT_FOUND)
>                 acpi_handle_warn(handle,
> -                               "failed to evaluate _DSM (0x%x)\n", ret);
> +                               "failed to evaluate _DSM %pUb (0x%x)\n",
> +                               ret, guid);

Shouldn't this be "guid, ret" ?  Also, don't you want to print the
value of the GUID rather than the address of its location?

And I don't think you need to break the line here.

>
>         return NULL;
>  }
> --
> 2.34.1
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ACPI: utils: include UUID in _DSM evaluation warning
  2022-05-17 14:49 ` Rafael J. Wysocki
@ 2022-05-17 18:25   ` Michael Niewöhner
  2022-05-17 18:28     ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Niewöhner @ 2022-05-17 18:25 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Len Brown, open list:ACPI, open list

On Tue, 2022-05-17 at 16:49 +0200, Rafael J. Wysocki wrote:
> On Mon, May 16, 2022 at 7:25 PM Michael Niewöhner <linux@mniewoehner.de>
> wrote:
> > 
> > The _DSM evaluation warning in its current form is not very helpful, as
> > it lacks any specific information:
> >   ACPI: \: failed to evaluate _DSM (0x1001)
> > 
> > Thus, include the UUID of the missing _DSM:
> >   ACPI: \: failed to evaluate _DSM bf0212f2-... (0x1001)
> > 
> > Signed-off-by: Michael Niewöhner <linux@mniewoehner.de>
> > ---
> >  drivers/acpi/utils.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> > index d5cedffeeff9..7da993f5b6c3 100644
> > --- a/drivers/acpi/utils.c
> > +++ b/drivers/acpi/utils.c
> > @@ -681,7 +681,8 @@ acpi_evaluate_dsm(acpi_handle handle, const guid_t
> > *guid,
> > u64 rev, u64 func,
> > 
> >         if (ret != AE_NOT_FOUND)
> >                 acpi_handle_warn(handle,
> > -                               "failed to evaluate _DSM (0x%x)\n", ret);
> > +                               "failed to evaluate _DSM %pUb (0x%x)\n",
> > +                               ret, guid);
> 
> Shouldn't this be "guid, ret" ?

Ouch, yes ofc.

> Also, don't you want to print the
> value of the GUID rather than the address of its location?

Not sure what you mean tbh. Documentation/core-api/printk-formats.rst states
%pUb being the right format. lib/test_printf.c implements it that way, too.

> 
> And I don't think you need to break the line here.
> 
> > 
> >         return NULL;
> >  }
> > --
> > 2.34.1
> > 
> > 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ACPI: utils: include UUID in _DSM evaluation warning
  2022-05-17 18:25   ` Michael Niewöhner
@ 2022-05-17 18:28     ` Rafael J. Wysocki
  2022-05-17 18:40       ` [PATCH v2] " Michael Niewöhner
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2022-05-17 18:28 UTC (permalink / raw)
  To: Michael Niewöhner
  Cc: Rafael J. Wysocki, Len Brown, open list:ACPI, open list

On Tue, May 17, 2022 at 8:26 PM Michael Niewöhner <linux@mniewoehner.de> wrote:
>
> On Tue, 2022-05-17 at 16:49 +0200, Rafael J. Wysocki wrote:
> > On Mon, May 16, 2022 at 7:25 PM Michael Niewöhner <linux@mniewoehner.de>
> > wrote:
> > >
> > > The _DSM evaluation warning in its current form is not very helpful, as
> > > it lacks any specific information:
> > >   ACPI: \: failed to evaluate _DSM (0x1001)
> > >
> > > Thus, include the UUID of the missing _DSM:
> > >   ACPI: \: failed to evaluate _DSM bf0212f2-... (0x1001)
> > >
> > > Signed-off-by: Michael Niewöhner <linux@mniewoehner.de>
> > > ---
> > >  drivers/acpi/utils.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> > > index d5cedffeeff9..7da993f5b6c3 100644
> > > --- a/drivers/acpi/utils.c
> > > +++ b/drivers/acpi/utils.c
> > > @@ -681,7 +681,8 @@ acpi_evaluate_dsm(acpi_handle handle, const guid_t
> > > *guid,
> > > u64 rev, u64 func,
> > >
> > >         if (ret != AE_NOT_FOUND)
> > >                 acpi_handle_warn(handle,
> > > -                               "failed to evaluate _DSM (0x%x)\n", ret);
> > > +                               "failed to evaluate _DSM %pUb (0x%x)\n",
> > > +                               ret, guid);
> >
> > Shouldn't this be "guid, ret" ?
>
> Ouch, yes ofc.
>
> > Also, don't you want to print the
> > value of the GUID rather than the address of its location?
>
> Not sure what you mean tbh. Documentation/core-api/printk-formats.rst states
> %pUb being the right format. lib/test_printf.c implements it that way, too.

I missed that, sorry.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] ACPI: utils: include UUID in _DSM evaluation warning
  2022-05-17 18:28     ` Rafael J. Wysocki
@ 2022-05-17 18:40       ` Michael Niewöhner
  2022-05-19 18:09         ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Niewöhner @ 2022-05-17 18:40 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, open list:ACPI, open list

The _DSM evaluation warning in its current form is not very helpful, as 
it lacks any specific information:
  ACPI: \: failed to evaluate _DSM (0x1001)

Thus, include the UUID of the missing _DSM:
  ACPI: \: failed to evaluate _DSM bf0212f2-... (0x1001)

Signed-off-by: Michael Niewöhner <linux@mniewoehner.de>
---
Changes in v2:
 - fix arguments order
 - fix indentation
 - drop line break

 drivers/acpi/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index d5cedffeeff9..3a9773a09e19 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -681,7 +681,7 @@ acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func,
 
 	if (ret != AE_NOT_FOUND)
 		acpi_handle_warn(handle,
-				"failed to evaluate _DSM (0x%x)\n", ret);
+				 "failed to evaluate _DSM %pUb (0x%x)\n", guid, ret);
 
 	return NULL;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ACPI: utils: include UUID in _DSM evaluation warning
  2022-05-17 18:40       ` [PATCH v2] " Michael Niewöhner
@ 2022-05-19 18:09         ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2022-05-19 18:09 UTC (permalink / raw)
  To: Michael Niewöhner
  Cc: Rafael J. Wysocki, Len Brown, open list:ACPI, open list

On Tue, May 17, 2022 at 8:40 PM Michael Niewöhner <linux@mniewoehner.de> wrote:
>
> The _DSM evaluation warning in its current form is not very helpful, as
> it lacks any specific information:
>   ACPI: \: failed to evaluate _DSM (0x1001)
>
> Thus, include the UUID of the missing _DSM:
>   ACPI: \: failed to evaluate _DSM bf0212f2-... (0x1001)
>
> Signed-off-by: Michael Niewöhner <linux@mniewoehner.de>
> ---
> Changes in v2:
>  - fix arguments order
>  - fix indentation
>  - drop line break
>
>  drivers/acpi/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> index d5cedffeeff9..3a9773a09e19 100644
> --- a/drivers/acpi/utils.c
> +++ b/drivers/acpi/utils.c
> @@ -681,7 +681,7 @@ acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func,
>
>         if (ret != AE_NOT_FOUND)
>                 acpi_handle_warn(handle,
> -                               "failed to evaluate _DSM (0x%x)\n", ret);
> +                                "failed to evaluate _DSM %pUb (0x%x)\n", guid, ret);
>
>         return NULL;
>  }
> --

Applied as 5.19 material, thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-19 18:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 17:25 [PATCH] ACPI: utils: include UUID in _DSM evaluation warning Michael Niewöhner
2022-05-17 14:49 ` Rafael J. Wysocki
2022-05-17 18:25   ` Michael Niewöhner
2022-05-17 18:28     ` Rafael J. Wysocki
2022-05-17 18:40       ` [PATCH v2] " Michael Niewöhner
2022-05-19 18:09         ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).