[PATCH 02/18] cdev: constify cdev_find_child_by_gpt_typeuuid's guid_t pointer argument

Ahmad Fatoum a.fatoum at pengutronix.de
Sun Apr 13 23:31:36 PDT 2025


From: Ahmad Fatoum <a.fatoum at barebox.org>

The UUID is only used for comparison and never written.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 fs/devfs-core.c  | 2 +-
 include/driver.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index f67c86b2267e..f84b34ea53ab 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -127,7 +127,7 @@ struct cdev *cdev_by_diskuuid(const char *diskuuid)
 }
 
 struct cdev *
-cdev_find_child_by_gpt_typeuuid(struct cdev *cdev, guid_t *typeuuid)
+cdev_find_child_by_gpt_typeuuid(struct cdev *cdev, const guid_t *typeuuid)
 {
 	struct cdev *partcdev;
 
diff --git a/include/driver.h b/include/driver.h
index d01d026b687b..3f2c681c0e80 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -609,7 +609,7 @@ static inline bool cdev_is_gpt_partitioned(const struct cdev *master)
 }
 
 struct cdev *
-cdev_find_child_by_gpt_typeuuid(struct cdev *cdev, guid_t *typeuuid);
+cdev_find_child_by_gpt_typeuuid(struct cdev *cdev, const guid_t *typeuuid);
 
 #ifdef CONFIG_FS_AUTOMOUNT
 void cdev_create_default_automount(struct cdev *cdev);
-- 
2.39.5




More information about the barebox mailing list