On 17.04.2025 10:48, Nicola Vetrini wrote:
> On 2025-04-17 10:36, Jan Beulich wrote:
>> The function has lost all clearing operations. Use the commonly
>> available name (declared in xen/smp.h), that x86 also uses.
>>
>> Signed-off-by: Jan Beulich <jbeul...@suse.com>
>> ---
>> I would have expected this to also address a Misra violation
>> (declaration without definition), but I can't spot any rule (having
>> looked through 8.x in particular) to this effect.
> 
> The rule you are looking for is 8.6: " An identifier with external 
> linkage shall have exactly one external definition", which is explicitly 
> deviated in Xen to allow declarations that have no definition, 
> especially in the case where definitions may be optimized out by the 
> compiler or are simply compiled out. I don't recall the specific 
> discussion that led to this deviation, but I can dug it up, if needed.

The respective deviation is imo bogus. Iirc if anything this is about
DCE, which isn't "definition is compiled-out or optimized-out by the
compiler" but "invocation is compiled-out or optimized-out by the
compiler": If the definition was optimized out, there necessarily _is_
a definition in source.

Jan

Reply via email to