On 2025-08-01 12:53, Jan Beulich wrote:
On 01.08.2025 12:48, Dmytro Prokopchuk1 wrote:
The conversion from a function pointer with the 'noreturn' attribute
('void noreturn (*)(...)') to a function pointer type ('void (*)(...)'
causes type incompatibility according to MISRA C Rule 11.1, which
forbids conversions between incompatible function pointer types.

This wider deviation ...

The violation occurs at the call site:
    smp_call_function(halt_this_cpu, NULL, 0);
where 'halt_this_cpu' with type 'void noreturn (*)(void *)' is passed to 'smp_call_function' expecting function pointer of type 'void (*)(void *)'.

The 'noreturn' attribute does not change the function calling convention
or parameter handling at runtime, making the conversion safe.

Configure ECLAIR to treat implicit conversions that lose the "noreturn"
attribute on a function 'void (*)(void*)' as safe.

... wants connecting to this more narrow Eclair configuration. That's what I meant when I said "description also suitably adjusted". For example, the last sentence above could start "For now, configure Eclair to just treat
...". Can adjust when committing, assuming an ack for the .ecl change
appears.

Signed-off-by: Dmytro Prokopchuk <dmytro_prokopch...@epam.com>

Acked-by: Jan Beulich <jbeul...@suse.com> # docs

Feels weird to review my own ecl honestly, but for the sake of the patch I verified that it is indeed what I wrote, so

Reviewed-by: Nicola Vetrini <nicola.vetr...@bugseng.com> # ECLAIR

--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253

Reply via email to