[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


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 27 Jul 2023 13:27:23 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZyrbDGTEaI8lZX5HsJm7bC/L+4G+KfvaMIdhYnjCcAQ=; b=fcVmbdgfcYw800YOKfpkXc0i54xPIgBMybJ9LcwK7or/S8lr3P58WrdQVcmoI32Zqp+kKfcdpDxdsHNI0JC0BBMOvni6VJRxXrUsrDLRFBuoTD0TB8imjLwERnmf0OfoVsSJRTEEB6qwQJPWGE900F3mttYKpbT2IpE0zFLCnMPN94rWJUJzYHT1ld6JLlQCTSaounrFAA930YtVc5Qf26uUmyV5ddV8ixGS4EF4dPVTu8kfYIvcqfAoZbkj0z7O40J19Kw1tpsciOMzJINeRVeBIUxtwTT/0AhS0oiw2gXHHFeDaXFEW1sqoMuqPIb423qZ8oCb3QoiKHcNE/PpKA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QBGddS7JazcrSuHDW716ap69wrlkkP/Zh9Pl0YeVoBn/Ia9ryB350AaRH4wVc1rnLDtPSG4hxnT8LC0uteLle7EgdQ4+D6miLQpGGkSDLBIJklydBMDFlBJIa6sTyp9skPTE1FAlIbUDsLQyIvdaVacfXUszsleV9/whn7wlCZ9H5474SUplijaHFhvftoMyRAIGG1fZD8sHPkQS3CJEd6qpMXmYlMOmX7+UNfOtKVO2RIsZtn3TyE+y3XFEyE552yaePkYnGfuOXMWct5h8j+GTJO4EwfeIb2YWHXMNqOUqOd37HE323k3Qq68VgDcMv9AfGcEk8hacnEhaQZCf5g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: consulting@xxxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 27 Jul 2023 11:28:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27.07.2023 13:02, Federico Serafini wrote:
> 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.

It's not entirely clear to me what 2 means, as I wouldn't expect you
intend to deal with "violations" which we may decide aren't any in
out world.

Jan



 


Rackspace

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