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

Breno Leitao
2024-05-22T08:52:26Z

Hello Michael,

On Tue, May 21, 2024 at 08:18:32PM +0300, michael.nemanov@ti.com wrote:
> From: Michael Nemanov <Michael.Nemanov@ti.com>
> + 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