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

Re-send: [PATCH v3] xen/irq: Delete the pirq_cleanup_check() macro


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
  • Date: Thu, 11 Dec 2025 11:35:12 +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=UQxYZA1XYl4u5xI8IHObiHUg9/LsSLFTLPvB6sOqkzs=; b=vwsarTARZ5cSRlmHzkb8AEg2PSSeseEdQgFYP6P2qsKKjQh8VtNgnYrctRYR4wLyi8H2htjBzzu+tSb1uexpw+OxUV9B5aLRe8AfbE6pKBxpQm5hZfvTWymt7r2R5roLWyPrLLNNQ33woLghRBe8xqibGiiXOWWy2GJjH0CO6bNutUCFilRIj0f+QPBckhNiSPwX6hqD+hhdlNxnVzUgwNeicOb08qF3Z0JLgMxd7olo1y6ydEj6IKjsQINaCLJpuVdGyz6snq1YmrAAZI5GBSn1mh7CYUVi9XGXKYQEj8/UZr2UGBbOdaw77knlFtQMQZltU/WYp27GbTJj0GLV3g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=V+hdc7BzcXkVIkdV4/n1HENa/HjssmWHAdwwooe/QcY3fVSa8KNNNwO2rOCDnAo/23Dl1X/cGdR22ywthu2DYUmh1n4u1l7V/3ZH7GCZosCm07FaQbtQv0I7fCt3J7PV9RTC1+dW6pz+8pvrkXTqhdrtsDa0L6uZkiorG7Xy1hlRRgbkyPOWzMSfLcmZC1ccfeTlBqXYbZ/56ve7/JcHYUHzhKyq7AjrA1ZLZlB2K2KraX5Wuxgu0iprwNExxubdzPL3dODOM/bmzHLSEe6gySvk5WeBflJ+d3P5da+Emox75jvTlYrLr8dXVZEJajY2HsIX9VpurBVRyaotM1wfWg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Thu, 11 Dec 2025 11:35:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcFfWhxHP2kMnOQkiD7UseguEusLR0c44AgKiE8gA=
  • Thread-topic: Re-send: [PATCH v3] xen/irq: Delete the pirq_cleanup_check() macro


On 8/26/25 09:07, Jan Beulich wrote:
> On 25.08.2025 21:22, Dmytro Prokopchuk1 wrote:
>> From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>
>> MISRA Rule 5.5 objects to a macro aliasing a function, which is what
>> pirq_cleanup_check() does. The macro was originally intended to ensure
>> the condition 'if (!pirq->evtchn)' is always checked before invoking
>> the function, avoiding errors across call sites.
>>
>> There are only a handful of users, so expand it inline to be plain
>> regular C. Doing this shows one path now needing braces, and one path
>> in 'evtchn_bind_pirq()' where the expanded form simplies back to no
>> delta, as it follows an unconditional clear of 'info->evtchn'.
>>
>> While this complies with MISRA, it shifts the responsibility to
>> developers to check 'if (!pirq->evtchn)' at call sites.
>>
>> No functional changes.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
>> ---
>> Changes in v3:
>> - added back wording from v1, originally written by Andrew.
> 
> Thanks. Just to mention, though - you copied it verbatim, including the
> typo (simplifies). Can surely be adjusted while committing, if and when
> somebody acks this. (I think it has become sufficiently clear that I'm
> not going to.)
> 
> Jan

Hi Stefano,

please, take a look. Maybe this patch is OK for you (it requires minor 
typo fix, mentioned by Jan)?

Thanks,
Dmytro.

 


Rackspace

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