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

Re: [XEN PATCH 2/3] xen/arm: irq: address violations of MISRA C: 2012 Rules 8.2 and 8.3



Hello Jan, Stefano,

On 25/07/23 21:32, Stefano Stabellini wrote:
On Tue, 25 Jul 2023, Jan Beulich wrote:
On 24.07.2023 19:50, Federico Serafini wrote:
@@ -182,7 +182,8 @@ void irq_set_affinity(struct irq_desc *desc, const 
cpumask_t *cpu_mask)
  }
int request_irq(unsigned int irq, unsigned int irqflags,
-                void (*handler)(int, void *, struct cpu_user_regs *),
+                void (*handler)(int irq, void *dev_id,
+                                struct cpu_user_regs *regs),
                  const char *devname, void *dev_id)
  {

Before we accept patches, don't we need to first settle on whether to
apply the rule(s) also to function type declarations (and not just
ordinary prototypes)?

Yes, in retrospect we should have found agreement on this issue this
morning but I forgot to bring it up :-(  Ooops.

(I think the agreement was to change the function type declarations too,
that's why docs/misra/rules.rst doesn't have a note about this, but I
don't want to make assumptions as I am not certain.)

I have ready a patch for violations of rules 8.2 and 8.3 in
xen/include/xen/iommu.h.
I am talking about this, in this IRQ thread, because I think the following two options also apply for an eventual v2 patch for the IRQ module, until a decision about rule 8.2 and function pointers is taken:

1) Split patches and submit only the changes *not* involving function
   pointers.
2) In the meantime that you make a decision,
   I submit patches thus addressing the existing violations.

I personally prefer the second one, but please let me know what you
think.

Regards
--
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)



 


Rackspace

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