Skip to contentSkip to conversation

ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h

PATCH Applied Robert Richter 3 participants 5 messages Jan 7, 2025 – Jan 14, 2025 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h

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 <[email protected]>
Cc John Allen <[email protected]>
Cc Borislav Petkov (AMD) <[email protected]>
---
 include/linux/prmt.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/prmt.h +2 -0
index 9c094294403f..c53ab287e932 100644
@@ -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);
Signature · 1 line
2.39.5
#1 lore raw
Quoted 23 lines · Robert Richter

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 <[email protected]>
Cc John Allen <[email protected]>
Cc Borislav Petkov (AMD) <[email protected]>
---
 include/linux/prmt.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/prmt.h +0 -0
index 9c094294403f..c53ab287e932 100644

include/linux/prmt.h line 7

Quoted 7 lines
include/linux/prmt.h +2 -0
@@ -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

#2 lore raw

Yazen,

Quoted 34 lines · Yazen Ghannam
Quoted 23 lines · Robert Richter

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 <[email protected]>
Cc John Allen <[email protected]>
Cc Borislav Petkov (AMD) <[email protected]>
---
 include/linux/prmt.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/prmt.h +0 -0
index 9c094294403f..c53ab287e932 100644

include/linux/prmt.h line 7

Quoted 7 lines
include/linux/prmt.h +2 -0
@@ -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,

Quoted 2 lines

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/[email protected]/

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

Reviewed-by
#3 lore raw
Quoted 17 lines · Robert Richter

Yazen,

Quoted 14 lines · Yazen Ghannam
Quoted 13 lines · Robert Richter

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 <[email protected]>
Cc John Allen <[email protected]>
Cc Borislav Petkov (AMD) <[email protected]>
Quoted 23 lines
Quoted 20 lines
Quoted 10 lines
---
 include/linux/prmt.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/prmt.h +0 -0
index 9c094294403f..c53ab287e932 100644

include/linux/prmt.h line 7

Quoted 7 lines
include/linux/prmt.h +2 -0
@@ -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,

Quoted 2 lines

This looks correct. But can you please share how you've encountered the issue?

Quoted 9 lines

sure, I have used it here:

https://lore.kernel.org/all/[email protected]/

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

maintainer Applied
#4 lore raw
Quoted 15 lines · Yazen Ghannam
Quoted 13 lines · Robert Richter

Yazen,

Quoted 10 lines · Yazen Ghannam
Quoted 9 lines · Robert Richter

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.

Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Cc Yazen Ghannam <[email protected]>
Cc John Allen <[email protected]>
Cc Borislav Petkov (AMD) <[email protected]>

Applied as 6.14 material, thanks!

Quoted 43 lines
Quoted 23 lines
Quoted 20 lines
Quoted 9 lines
---
 include/linux/prmt.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/prmt.h +0 -0
index 9c094294403f..c53ab287e932 100644

include/linux/prmt.h

Quoted 8 lines
include/linux/prmt.h +2 -1
@@ -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,

Quoted 2 lines

This looks correct. But can you please share how you've encountered the issue?

Quoted 9 lines

sure, I have used it here:

https://lore.kernel.org/all/[email protected]/

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