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

Re: [PATCH v2 2/3] misra: deviate MISRA C Rule 5.5 for 'request_irq()'


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
  • Date: Mon, 13 Jul 2026 17:59:42 +0000
  • Accept-language: en-US, uk-UA, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nZxrmIVWqlRldH4npMLmAsYDah1qCYroYtIEtOvWWzQ=; b=L2Ob6AOoeyM+Y/IvMZhc4R7NkCSYV0UfEdSAJTkmspdcsi+CzlsIGLrwvGYwaxCeE8pB11ciSmaW3ql3EhnEc1XzogQUhhyyZxrXfplSqvKfpRMGDxRQom4QuIeiSQJTi1Pr02nI4A9ZFhWwhlItZsUoMN/HZzYenqewv8rus3hgjdzAZ1mxqHx7/nfEyXaOj8qiISkB+sm4fQc5iMQ4HXcvU9Avo9UUrvpuprFVmLIlHl6AHoROhg1IbMroJDjElsFVcf6JwBYBeznz+tpR1bU2JyzPizHTkT2qTjnYbzI2NDdH0h8e7lXiWoLjbIkPpFRfb7o7dVP5FIEbcoD+jw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nx+vPw44yxAYeAOlT+x55G5Go7dk2x/sdj3Ars37TX2/MIpMIHVM2BNSwhjoIjppI4p1YVGk4weaCSgzGzdoLN/6tF7HsXNn0AmD3+8k24Y4BBxuuPi/liGSWcJrKrQB84YtmmPRb/+kvNXcEUh9S6eiFtqk+auSVP3kGbtnYYxY0KAuGd7gVurAOylF/2XdYVM9mMm4t0RcIQG8fPXglD2zBOe2p3RIiDk+zFLO5b9dHGl/iOYzcbpJGcVPqZfso7Tsv4ZtdYn0kaCKHn6ewlCYJ9nfwjb2ni3cP0BaPJlbqZ37/KLAU3cNOU3PmiRcBcYsROhmO65TsGVr07br1w==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 13 Jul 2026 18:00:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHdEgdlLv7TI7G6yke6ZZX0wGJbm7ZrCSsAgAC1h4A=
  • Thread-topic: [PATCH v2 2/3] misra: deviate MISRA C Rule 5.5 for 'request_irq()'

Hello Jan,

On 7/13/26 10:09, Jan Beulich wrote:
> On 12.07.2026 16:04, Dmytro Prokopchuk1 wrote:
>> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
>> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
>> @@ -136,6 +136,10 @@ These macros address differences in argument count 
>> during compile-time, effectiv
>>   
>> -config=MC3A2.R5.5,ignored_macros+="name(hypfs_alloc_dyndata)&&loc(file(^xen/include/xen/hypfs\\.h$))"
>>   -doc_end
>>   
>> +-doc_begin="Clash between 'request_irq()' function and macro name in 
>> 'xen/drivers/passthrough/arm/smmu.c' is deliberate."
>> +-config=MC3A2.R5.5,ignored_macros+="name(request_irq)&&loc(file(^xen/drivers/passthrough/arm/smmu\\.c$))"
>> +-doc_end
> 
> This suitably constrains things to a single file.
> 
>> --- a/docs/misra/deviations.rst
>> +++ b/docs/misra/deviations.rst
>> @@ -185,6 +185,13 @@ Deviations related to MISRA C:2012 Rules:
>>          function, so the name clash is controlled.
>>        - ECLAIR has been configured to ignore this macro.
>>   
>> +   * - R5.5
>> +     - Clash between the 'request_irq()' function and macro name is 
>> deliberate.
> 
> This doesn't, and ...
> 
>> +       The function uses the Xen 'request_irq()' argument order, while the 
>> macro
>> +       is a compatibility wrapper for the ARM SMMU driver that adapts calls 
>> by
>> +       reordering the handler and flags arguments.
>> +     - ECLAIR has been configured to ignore this macro.
> 
> ... there's then not even a mention of the file name later (ftaod: even if
> there was, to me at least this would come too late).
> 
>> --- a/docs/misra/rules.rst
>> +++ b/docs/misra/rules.rst
>> @@ -226,6 +226,10 @@ maintainers if you want to suggest a change.
>>          because the macro is a typed convenience wrapper around the 
>> size-based
>>          allocation function.
>>   
>> +       Clash between request_irq() function and macro names is allowed 
>> because
>> +       the macro is a local compatibility wrapper that adapts ARM SMMU 
>> driver
>> +       call to Xen's request_irq() argument order.
> 
> Similarly here.
> 
> Jan

Sounds reasonable. I'll update wording with specifying file name.

BR, Dmytro.

 


Rackspace

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