All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] earlycpio: constify find_cpio_data()'s "data" parameter
@ 2024-10-28 16:03 Jan Beulich
  2024-10-28 16:07 ` Andrew Cooper
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2024-10-28 16:03 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Andrew Cooper, Julien Grall, Stefano Stabellini

As with 9cbf61445cda ("xen/earlycpio: Drop nextoff parameter"): While
this is imported from Linux, the parameter not being pointer-to-const is
dubious in the first place and we're not plausibly going to gain a write
through it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/common/earlycpio.c
+++ b/xen/common/earlycpio.c
@@ -64,7 +64,8 @@ enum cpio_fields {
  *              the match returned an empty filename string.
  */
 
-struct cpio_data __init find_cpio_data(const char *path, void *data, size_t len)
+struct cpio_data __init find_cpio_data(
+	const char *path, const void *data, size_t len)
 {
 	const size_t cpio_header_len = 8*C_NFIELDS - 2;
 	struct cpio_data cd = { NULL, 0, "" };
--- a/xen/include/xen/earlycpio.h
+++ b/xen/include/xen/earlycpio.h
@@ -9,6 +9,6 @@ struct cpio_data {
 	char name[MAX_CPIO_FILE_NAME];
 };
 
-struct cpio_data find_cpio_data(const char *path, void *data, size_t len);
+struct cpio_data find_cpio_data(const char *path, const void *data, size_t len);
 
 #endif /* _EARLYCPIO_H */


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-10-28 17:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28 16:03 [PATCH] earlycpio: constify find_cpio_data()'s "data" parameter Jan Beulich
2024-10-28 16:07 ` Andrew Cooper
2024-10-28 16:12   ` Jan Beulich
2024-10-28 16:18     ` Andrew Cooper
2024-10-28 16:25       ` Jan Beulich
2024-10-28 16:45         ` Andrew Cooper
2024-10-28 16:51           ` Jan Beulich
2024-10-28 17:07             ` Frediano Ziglio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.