[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] x86/IO-APIC: drop setup_ioapic_ids_from_mpc()




On 9/10/25 3:36 PM, Jan Beulich wrote:
On 10.09.2025 15:26, Andrew Cooper wrote:
On 03/09/2025 8:55 am, Jan Beulich wrote:
Along the lines of what b89f8f054f96 ("x86/apic: Drop sync_Arb_IDs()")
said, the function is dead logic as well: All 64-bit capable Intel systems
have (at least) xAPIC (if not x2APIC).

Even if Eclair can't know it, such code is violating Misra rule 2.2 (dead
code; we didn't accept that yet, but - where possible - we probably would
better follow it). Depending on one's reading, this code may actually be a
violation of rule 2.1 (unreachable), which we did accept:

"Code is unreachable if, ..., there is no combination of program inputs
 that can cause it to be executed."

Otoh it's "only" __init code.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
The code change is fine, but the commit message should be first
paragraph only.

The first paragraph is plenty of justification to make the change,
irrespective of anything else.
Well. I wouldn't have added the other parts if we weren't where we are in
the release cycle. Strictly speaking, with them dropped I can't put these
two patches in right now. Oleksii, may I ask for your view please (on
both of the patches, as they're both similar in this regard)?
For both patches, I think it would still be useful to retain the explanation
about the MISRA Rule 2.2 violation in the commit message. While I agree that
the first paragraph provides sufficient justification on its own, the additional
context helps clarify why we're committing this change now, rather than waiting
until after the release. It also highlights the additional benefit of improving
MISRA compliance by removing this dead code.

Anyway, I am okay with having these patches merged now:
 Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>

~ Oleksii

The other 3 paragraphs are musings on an area of MISRA where which is
unclear, or even disputed.  The code here is statically reachable,
dynamically unreachable, and trying to argue this in terms of dead or
unreachability detracts from an otherwise clear patch.

With a very strong preference to have the commit message be only the
first paragraph, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Thanks (also for the one for patch 2).

Jan

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.