* [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h
@ 2025-01-07 16:19 Robert Richter
2025-01-08 15:10 ` Yazen Ghannam
0 siblings, 1 reply; 5+ messages in thread
From: Robert Richter @ 2025-01-07 16:19 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Len Brown, linux-acpi, linux-kernel, Robert Richter,
Yazen Ghannam, John Allen, Borislav Petkov
Seen the following build error:
./include/linux/prmt.h:5:27: error: unknown type name ‘guid_t’
5 | int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
| ^~~~~~
The include file uses guid_t but it is not declared. Include
linux/uuid.h to fix this.
Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: John Allen <john.allen@amd.com>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Robert Richter <rrichter@amd.com>
---
include/linux/prmt.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/prmt.h b/include/linux/prmt.h
index 9c094294403f..c53ab287e932 100644
--- a/include/linux/prmt.h
+++ b/include/linux/prmt.h
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <linux/uuid.h>
+
#ifdef CONFIG_ACPI_PRMT
void init_prmt(void);
int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h
2025-01-07 16:19 [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h Robert Richter
@ 2025-01-08 15:10 ` Yazen Ghannam
2025-01-09 11:43 ` Robert Richter
0 siblings, 1 reply; 5+ messages in thread
From: Yazen Ghannam @ 2025-01-08 15:10 UTC (permalink / raw)
To: Robert Richter
Cc: Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel,
John Allen, Borislav Petkov
On Tue, Jan 07, 2025 at 05:19:22PM +0100, Robert Richter wrote:
> Seen the following build error:
>
> ./include/linux/prmt.h:5:27: error: unknown type name ‘guid_t’
> 5 | int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> | ^~~~~~
>
> The include file uses guid_t but it is not declared. Include
> linux/uuid.h to fix this.
>
> Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
> Cc: John Allen <john.allen@amd.com>
> Cc: Borislav Petkov (AMD) <bp@alien8.de>
> Signed-off-by: Robert Richter <rrichter@amd.com>
> ---
> include/linux/prmt.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/prmt.h b/include/linux/prmt.h
> index 9c094294403f..c53ab287e932 100644
> --- a/include/linux/prmt.h
> +++ b/include/linux/prmt.h
> @@ -1,5 +1,7 @@
> /* SPDX-License-Identifier: GPL-2.0-only */
>
> +#include <linux/uuid.h>
> +
> #ifdef CONFIG_ACPI_PRMT
> void init_prmt(void);
> int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> --
Hi Robert,
This looks correct. But can you please share how you've encountered the
issue?
Thanks,
Yazen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h
2025-01-08 15:10 ` Yazen Ghannam
@ 2025-01-09 11:43 ` Robert Richter
2025-01-10 14:47 ` Yazen Ghannam
0 siblings, 1 reply; 5+ messages in thread
From: Robert Richter @ 2025-01-09 11:43 UTC (permalink / raw)
To: Yazen Ghannam
Cc: Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel,
John Allen, Borislav Petkov
Yazen,
On 08.01.25 10:10:37, Yazen Ghannam wrote:
> On Tue, Jan 07, 2025 at 05:19:22PM +0100, Robert Richter wrote:
> > Seen the following build error:
> >
> > ./include/linux/prmt.h:5:27: error: unknown type name ‘guid_t’
> > 5 | int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > | ^~~~~~
> >
> > The include file uses guid_t but it is not declared. Include
> > linux/uuid.h to fix this.
> >
> > Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
> > Cc: John Allen <john.allen@amd.com>
> > Cc: Borislav Petkov (AMD) <bp@alien8.de>
> > Signed-off-by: Robert Richter <rrichter@amd.com>
> > ---
> > include/linux/prmt.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/include/linux/prmt.h b/include/linux/prmt.h
> > index 9c094294403f..c53ab287e932 100644
> > --- a/include/linux/prmt.h
> > +++ b/include/linux/prmt.h
> > @@ -1,5 +1,7 @@
> > /* SPDX-License-Identifier: GPL-2.0-only */
> >
> > +#include <linux/uuid.h>
> > +
> > #ifdef CONFIG_ACPI_PRMT
> > void init_prmt(void);
> > int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > --
>
> Hi Robert,
>
> This looks correct. But can you please share how you've encountered the
> issue?
sure, I have used it here:
https://lore.kernel.org/all/20250107141015.3367194-26-rrichter@amd.com/
I just included linux/prmt.h to get the declaration of
acpi_call_prm_handler() without anything else. I assume other users of
linux/prmt.h indirectly include linux/uuid.h with some other include
file.
Thanks for review,
-Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h
2025-01-09 11:43 ` Robert Richter
@ 2025-01-10 14:47 ` Yazen Ghannam
2025-01-14 17:25 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Yazen Ghannam @ 2025-01-10 14:47 UTC (permalink / raw)
To: Robert Richter
Cc: Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel,
John Allen, Borislav Petkov
On Thu, Jan 09, 2025 at 12:43:09PM +0100, Robert Richter wrote:
> Yazen,
>
> On 08.01.25 10:10:37, Yazen Ghannam wrote:
> > On Tue, Jan 07, 2025 at 05:19:22PM +0100, Robert Richter wrote:
> > > Seen the following build error:
> > >
> > > ./include/linux/prmt.h:5:27: error: unknown type name ‘guid_t’
> > > 5 | int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > > | ^~~~~~
> > >
> > > The include file uses guid_t but it is not declared. Include
> > > linux/uuid.h to fix this.
> > >
> > > Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
> > > Cc: John Allen <john.allen@amd.com>
> > > Cc: Borislav Petkov (AMD) <bp@alien8.de>
> > > Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
> > > ---
> > > include/linux/prmt.h | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/include/linux/prmt.h b/include/linux/prmt.h
> > > index 9c094294403f..c53ab287e932 100644
> > > --- a/include/linux/prmt.h
> > > +++ b/include/linux/prmt.h
> > > @@ -1,5 +1,7 @@
> > > /* SPDX-License-Identifier: GPL-2.0-only */
> > >
> > > +#include <linux/uuid.h>
> > > +
> > > #ifdef CONFIG_ACPI_PRMT
> > > void init_prmt(void);
> > > int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > > --
> >
> > Hi Robert,
> >
> > This looks correct. But can you please share how you've encountered the
> > issue?
>
> sure, I have used it here:
>
> https://lore.kernel.org/all/20250107141015.3367194-26-rrichter@amd.com/
>
> I just included linux/prmt.h to get the declaration of
> acpi_call_prm_handler() without anything else. I assume other users of
> linux/prmt.h indirectly include linux/uuid.h with some other include
> file.
>
Thanks Robert. This reminded me of a rule, but it took me a bit to find
it again.
Documentation/process/submit-checklist.rst -> "Review your code" #1
I wonder: is there a script, coccinelle test, or something that will
catch this in case we forget?
Thanks,
Yazen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h
2025-01-10 14:47 ` Yazen Ghannam
@ 2025-01-14 17:25 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2025-01-14 17:25 UTC (permalink / raw)
To: Yazen Ghannam, Robert Richter
Cc: Len Brown, linux-acpi, linux-kernel, John Allen, Borislav Petkov
On Fri, Jan 10, 2025 at 3:48 PM Yazen Ghannam <yazen.ghannam@amd.com> wrote:
>
> On Thu, Jan 09, 2025 at 12:43:09PM +0100, Robert Richter wrote:
> > Yazen,
> >
> > On 08.01.25 10:10:37, Yazen Ghannam wrote:
> > > On Tue, Jan 07, 2025 at 05:19:22PM +0100, Robert Richter wrote:
> > > > Seen the following build error:
> > > >
> > > > ./include/linux/prmt.h:5:27: error: unknown type name ‘guid_t’
> > > > 5 | int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > > > | ^~~~~~
> > > >
> > > > The include file uses guid_t but it is not declared. Include
> > > > linux/uuid.h to fix this.
> > > >
> > > > Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
> > > > Cc: John Allen <john.allen@amd.com>
> > > > Cc: Borislav Petkov (AMD) <bp@alien8.de>
> > > > Signed-off-by: Robert Richter <rrichter@amd.com>
>
> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Applied as 6.14 material, thanks!
> > > > ---
> > > > include/linux/prmt.h | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/include/linux/prmt.h b/include/linux/prmt.h
> > > > index 9c094294403f..c53ab287e932 100644
> > > > --- a/include/linux/prmt.h
> > > > +++ b/include/linux/prmt.h
> > > > @@ -1,5 +1,7 @@
> > > > /* SPDX-License-Identifier: GPL-2.0-only */
> > > >
> > > > +#include <linux/uuid.h>
> > > > +
> > > > #ifdef CONFIG_ACPI_PRMT
> > > > void init_prmt(void);
> > > > int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > > > --
> > >
> > > Hi Robert,
> > >
> > > This looks correct. But can you please share how you've encountered the
> > > issue?
> >
> > sure, I have used it here:
> >
> > https://lore.kernel.org/all/20250107141015.3367194-26-rrichter@amd.com/
> >
> > I just included linux/prmt.h to get the declaration of
> > acpi_call_prm_handler() without anything else. I assume other users of
> > linux/prmt.h indirectly include linux/uuid.h with some other include
> > file.
> >
>
> Thanks Robert. This reminded me of a rule, but it took me a bit to find
> it again.
>
> Documentation/process/submit-checklist.rst -> "Review your code" #1
>
> I wonder: is there a script, coccinelle test, or something that will
> catch this in case we forget?
>
> Thanks,
> Yazen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-14 17:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 16:19 [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h Robert Richter
2025-01-08 15:10 ` Yazen Ghannam
2025-01-09 11:43 ` Robert Richter
2025-01-10 14:47 ` Yazen Ghannam
2025-01-14 17:25 ` 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