bootconfig: constify xbc_calc_checksum() data parameter

xbc_calc_checksum() only reads the data buffer, so mark the parameter
as const void * and the internal pointer as const unsigned char *.

Link: https://lore.kernel.org/all/20260318155919.78168-7-objecting@objecting.org/

Signed-off-by: Josh Law <objecting@objecting.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
master
Josh Law 2026-03-18 15:59:12 +00:00 committed by Masami Hiramatsu (Google)
parent 73a9f74b86
commit 306c36a76d
1 changed files with 2 additions and 2 deletions

View File

@ -36,9 +36,9 @@ bool __init cmdline_has_extra_options(void);
* The checksum will be used with the BOOTCONFIG_MAGIC and the size for
* embedding the bootconfig in the initrd image.
*/
static inline __init uint32_t xbc_calc_checksum(void *data, uint32_t size)
static inline __init uint32_t xbc_calc_checksum(const void *data, uint32_t size)
{
unsigned char *p = data;
const unsigned char *p = data;
uint32_t ret = 0;
while (size--)