efi_guid_to_str() only formats the GUID through the byte array passed to
the UUID printf formatter. It does not modify the GUID contents.
Make the input pointer const so callers can stringify GUIDs from const
data without a cast.
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
include/linux/efi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/efi.h b/include/linux/efi.h
index ccbc35479684..cf5cc85e3fc8 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -705,7 +705,7 @@ efi_guidcmp (efi_guid_t left, efi_guid_t right)
}
static inline char *
-efi_guid_to_str(efi_guid_t *guid, char *out)
+efi_guid_to_str(const efi_guid_t *guid, char *out)
{
sprintf(out, "%pUl", guid->b);
return out;
---
base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
change-id: 20260722-efi_guid_to_str-const-guid-a5b2accc7f0a
Best regards,
--
Vincent Mailhol <mailhol@kernel.org>