Skip to content

Commit

Permalink
buildid: mark some arguments const
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bebarino authored and torvalds committed Jul 8, 2021
1 parent d5ce757 commit 60eec32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/buildid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 60eec32

Please sign in to comment.