ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h
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.
--- include/linux/prmt.h | 2 ++ 1 file changed, 2 insertions(+)
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);
Signature · 1 line
2.39.5
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_tbut it is not declared. Includelinux/uuid.hto fix this.Cc Yazen Ghannam <[email protected]>Cc John Allen <[email protected]>Cc Borislav Petkov (AMD) <[email protected]>Signed-off-by Robert Richter <[email protected]>--- include/linux/prmt.h | 2 ++ 1 file changed, 2 insertions(+)include/linux/prmt.h +0
-0
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
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_tbut it is not declared. Includelinux/uuid.hto fix this.Cc Yazen Ghannam <[email protected]>Cc John Allen <[email protected]>Cc Borislav Petkov (AMD) <[email protected]>Signed-off-by Robert Richter <[email protected]>--- include/linux/prmt.h | 2 ++ 1 file changed, 2 insertions(+)include/linux/prmt.h +0
-0include/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
Yazen Ghannam
Reviewed-byQuoted 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_tbut it is not declared. Includelinux/uuid.hto fix this.Cc Yazen Ghannam <[email protected]>Cc John Allen <[email protected]>Cc Borislav Petkov (AMD) <[email protected]>Signed-off-by Robert Richter <[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
-0include/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.hto get the declaration ofacpi_call_prm_handler()without anything else. I assume other users oflinux/prmt.hindirectly includelinux/uuid.hwith 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
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_tbut it is not declared. Includelinux/uuid.hto 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]>Signed-off-by Robert Richter <[email protected]>Reviewed-by Yazen Ghannam <[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
-0include/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.hto get the declaration ofacpi_call_prm_handler()without anything else. I assume other users oflinux/prmt.hindirectly includelinux/uuid.hwith 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" #1I wonder: is there a script, coccinelle test, or something that will catch this in case we forget?
Thanks,
Yazen