Skip to content

Commit 60eec32

Browse files
bebarinotorvalds
authored andcommitted
buildid: mark some arguments const
These arguments are never modified so they can be marked const to indicate as such. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Jessica Yu <[email protected]> Cc: Evan Green <[email protected]> Cc: Hsin-Yi Wang <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Baoquan He <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Dave Young <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Petr Mladek <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d5ce757 commit 60eec32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/buildid.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ static int parse_build_id_buf(unsigned char *build_id,
4848
return -EINVAL;
4949
}
5050

51-
static inline int parse_build_id(void *page_addr,
51+
static inline int parse_build_id(const void *page_addr,
5252
unsigned char *build_id,
5353
__u32 *size,
54-
void *note_start,
54+
const void *note_start,
5555
Elf32_Word note_size)
5656
{
5757
/* check for overflow */
@@ -66,7 +66,7 @@ static inline int parse_build_id(void *page_addr,
6666
}
6767

6868
/* Parse build ID from 32-bit ELF */
69-
static int get_build_id_32(void *page_addr, unsigned char *build_id,
69+
static int get_build_id_32(const void *page_addr, unsigned char *build_id,
7070
__u32 *size)
7171
{
7272
Elf32_Ehdr *ehdr = (Elf32_Ehdr *)page_addr;
@@ -91,7 +91,7 @@ static int get_build_id_32(void *page_addr, unsigned char *build_id,
9191
}
9292

9393
/* Parse build ID from 64-bit ELF */
94-
static int get_build_id_64(void *page_addr, unsigned char *build_id,
94+
static int get_build_id_64(const void *page_addr, unsigned char *build_id,
9595
__u32 *size)
9696
{
9797
Elf64_Ehdr *ehdr = (Elf64_Ehdr *)page_addr;

0 commit comments

Comments
 (0)