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

Re: [XEN PATCH 7/8] x86/i8259: address MISRA C:2012 Rule 8.4


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 10 Aug 2023 10:33:24 +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=Z3OkJbBC03VMDXwYdmp17cOWGy0bysdttfteuH7xhkg=; b=OnEcLM2QPCYcibQBM0f3ZfxA+v90EXNyQrQoqDnvs/VCpt7lEqQ/qVJUTXqBAyOKBmYynF8t55o7Xj5SBzLamrikNrllPxkB4ZX8SpQq6DsqjmuLoOb6xyu+ERJfSLU5MOk4QLKDsxBsXdRLbsU7GZ7kIrZX/pureb0DE9u9+ZhXLkVAQQXrt9a1QqWoJWiNdVItnGVUbYKZDHvo0Dw82h/oJXn1MdCkaFUk99WkOmcQbS5iv86cIPcmo/MuFmy68T0PceV1S43BYDDZ4FNfW8OWeVWksF00VOMOJ2VmHLkRZ8OjAHimDx2gfFm+QKYxH7UTRfD0d21OspxRdntT7g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fN2v9kFvHdGvFINtlIDqZ0Nygd7V7MjP84snU4WXaBj+01iYBkhpfEtUV7w6M1dFf9WZqZvjN9Z+PN2i7n2gfkbLVFtplX3lMreCUiaVc9zZLPuDg+/Mo4OYU0T4Pw2PQFLvXfWwI7J8+IMkvWaV1Nk+JOl/3jbr8yGIqW9/RGC7alzqRjmu6xmsSNo2YlJGfN/gP8BikYsuo1WD3jo1YumhN0KZi1HhYqXzhFg3Hx1KAigHahlgi7MjAx89NQsG+go1e/i4L0h6tX7wRuFlH4fZXvxmnQmQ5NeEMe2CZt9HuTiGIDBx6BCapk/Gj+A6WUHZl0bKHWtPlC2CfAoa2g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 10 Aug 2023 08:34:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.08.2023 22:15, Stefano Stabellini wrote:
> On Wed, 9 Aug 2023, Jan Beulich wrote:
>> On 09.08.2023 16:17, Nicola Vetrini wrote:
>>> On 09/08/2023 14:52, Jan Beulich wrote:
>>>> On 09.08.2023 13:02, Nicola Vetrini wrote:
>>>>> The additional header file makes the declaration for the function
>>>>> 'init_IRQ', defined in this file visible, thereby resolving the
>>>>> violation of Rule 8.4.
>>>>>
>>>>> No functional change.
>>>>>
>>>>> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>>>>> ---
>>>>>  xen/arch/x86/i8259.c | 1 +
>>>>>  1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
>>>>> index 6b35be10f0..9b02a3a0ae 100644
>>>>> --- a/xen/arch/x86/i8259.c
>>>>> +++ b/xen/arch/x86/i8259.c
>>>>> @@ -19,6 +19,7 @@
>>>>>  #include <xen/delay.h>
>>>>>  #include <asm/apic.h>
>>>>>  #include <asm/asm_defns.h>
>>>>> +#include <asm/setup.h>
>>>>>  #include <io_ports.h>
>>>>>  #include <irq_vectors.h>
>>>>
>>>> A patch adding this #include has been pending for almost 3 months:
>>>> https://lists.xen.org/archives/html/xen-devel/2023-05/msg00896.html
>>>
>>> So do you prefer going forward with that patch or this one (mentioning 
>>> it
>>> in the additional commit context of course)?
>>
>> I would prefer using the much older patch, but of course this requires
>> someone providing R-b or A-b.
> 
> Hi Jan, normally I'd be happy to do that but that patch makes other
> changes that I don't feel confident enough to Ack.

I understand that in general, but for this specific case ...

> For instance:
> 
> +    for ( offs = 0, i = pic_alias_mask & -pic_alias_mask ?: 2;
> +          offs <= pic_alias_mask; offs += i )
> 
> pic_alias_mask is declared as unsigned int.

... you're concerned of me negating it? That's a common pattern to determine
the largest power-of-2 factor. I'm unaware of a good alternative.

Jan



 


Rackspace

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