These arguments are never modified so they can be marked const to
indicate as such.

Cc: Jiri Olsa <jo...@kernel.org>
Cc: Alexei Starovoitov <a...@kernel.org>
Cc: Jessica Yu <j...@kernel.org>
Cc: Evan Green <evgr...@chromium.org>
Cc: Hsin-Yi Wang <hsi...@chromium.org>
Signed-off-by: Stephen Boyd <swb...@chromium.org>
---
 lib/buildid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/buildid.c b/lib/buildid.c
index 1103ed46214f..df42282b36ff 100644
--- a/lib/buildid.c
+++ b/lib/buildid.c
@@ -48,10 +48,10 @@ static int parse_build_id_buf(unsigned char *build_id,
        return -EINVAL;
 }
 
-static inline int parse_build_id(void *page_addr,
+static inline int parse_build_id(const void *page_addr,
                                 unsigned char *build_id,
                                 __u32 *size,
-                                void *note_start,
+                                const void *note_start,
                                 Elf32_Word note_size)
 {
        /* check for overflow */
@@ -66,7 +66,7 @@ static inline int parse_build_id(void *page_addr,
 }
 
 /* Parse build ID from 32-bit ELF */
-static int get_build_id_32(void *page_addr, unsigned char *build_id,
+static int get_build_id_32(const void *page_addr, unsigned char *build_id,
                           __u32 *size)
 {
        Elf32_Ehdr *ehdr = (Elf32_Ehdr *)page_addr;
@@ -91,7 +91,7 @@ static int get_build_id_32(void *page_addr, unsigned char 
*build_id,
 }
 
 /* Parse build ID from 64-bit ELF */
-static int get_build_id_64(void *page_addr, unsigned char *build_id,
+static int get_build_id_64(const void *page_addr, unsigned char *build_id,
                           __u32 *size)
 {
        Elf64_Ehdr *ehdr = (Elf64_Ehdr *)page_addr;
-- 
https://chromeos.dev

Reply via email to