|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 01/12] x86/IO-APIC: address Misra 2.1 rule violations
On Fri, Aug 28, 2026 at 08:59:41AM +0200, Jan Beulich wrote:
> In both functions cases 0..3 are handled, and a 2-bit mask is applied to
> the switch() expression. Therefore the default: cases are reported
> unreachable by Eclair. Subsume the "case 2" blocks each into the
> corresponding default ones.
>
> While there also drop all the pointless figure braces inside the various
> case blocks, inserting blank lines instead between them.
>
> No functional change.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
>
> --- a/xen/arch/x86/io_apic.c
> +++ b/xen/arch/x86/io_apic.c
> @@ -804,66 +804,48 @@ static int __init MPBIOS_polarity(int id
> switch (mp_irqs[idx].mpc_irqflag & 3)
> {
> case 0: /* conforms, ie. bus-type dependent polarity */
> - {
> switch (mp_bus_id_to_type[bus])
> {
> case MP_BUS_ISA: /* ISA pin */
> - {
> polarity = default_ISA_polarity(idx);
> break;
> - }
> +
> case MP_BUS_EISA: /* EISA pin */
> - {
> polarity = default_EISA_polarity(idx);
> break;
> - }
> +
> case MP_BUS_PCI: /* PCI pin */
> - {
> polarity = default_PCI_polarity(idx);
> break;
> - }
> +
> case MP_BUS_MCA: /* MCA pin */
> - {
> polarity = default_MCA_polarity(idx);
> break;
> - }
> +
> case MP_BUS_NEC98: /* NEC 98 pin */
> - {
> polarity = default_NEC98_polarity(idx);
> break;
> - }
> +
> default:
> - {
> printk(KERN_WARNING "broken BIOS!!\n");
> polarity = 1;
> break;
> }
> - }
> break;
> - }
> +
> case 1: /* high active */
> - {
> polarity = 0;
> break;
> - }
> - case 2: /* reserved */
> - {
> - printk(KERN_WARNING "broken BIOS!!\n");
> - polarity = 1;
> - break;
> - }
> +
> case 3: /* low active */
> - {
> polarity = 1;
> break;
> - }
> - default: /* invalid */
> - {
> +
> + default: /* reserved */
> printk(KERN_WARNING "broken BIOS!!\n");
We should also see about improving those messages, because this is not
helpful at all.
Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |