2024-05-22 08:52:54

by Breno Leitao

[permalink] [raw]
Subject: Re: [PATCH 08/17] Add main.c

Hello Michael,

On Tue, May 21, 2024 at 08:18:32PM +0300, [email protected] wrote:
> From: Michael Nemanov <[email protected]>
> + default:
> + print_hex_dump(KERN_DEBUG, "message dump:",
> + DUMP_PREFIX_OFFSET, 16, 1,
> + start_of_payload, buffer_length, false);
> +
> + WARN(1, "Error processing device message @ offset %x",
> + (size_t)(buffer - start_of_payload));

I got the following error when compiling it:

drivers/net/wireless/ti/cc33xx/main.c: In function ‘parse_control_message’:
drivers/net/wireless/ti/cc33xx/main.c:798:33: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
798 | WARN(1, "Error processing device message @ offset %x",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
799 | (size_t)(buffer - start_of_payload));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
./include/asm-generic/bug.h:106:31: note: in definition of macro ‘__WARN_printf’
106 | __warn_printk(arg); \
| ^~~
drivers/net/wireless/ti/cc33xx/main.c:798:25: note: in expansion of macro ‘WARN’
798 | WARN(1, "Error processing device message @ offset %x",
| ^~~~
drivers/net/wireless/ti/cc33xx/main.c:798:76: note: format string is defined here
798 | WARN(1, "Error processing device message @ offset %x",
| ~^
| |
| unsigned int
| %lx