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

Re: [PATCH] xen/evtchn: Purge ERROR_EXIT{,_DOM}()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 14 Jun 2023 11:36:51 +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=mUi/OHTpdEXbk/sOXVFrArakKFaFVknHrqKvnCzPPNc=; b=DLTAGs4oU9hwYk9P8E5f+KeMbWasnrMeGAOR9manTCzK3Gg7ehC/abjixFVPi6Ckoq/gyTBBU54UOm8KX8X27YnesJxc65qmotx5lzNtYFUcGRvYmuehq9D/ANIipRPyl64i692ou7KIFEG/37Cbc88tm2x2hJ5nSZukvANazKXEbWLpNejdS7aibwV0HlTLXeXe1CCO+TYYlEKY04Al8yUGhdwOhaybYbvwT7267XYYqERUoY/ztq2jnr/pDKnzZe1ilH3HHfqcGqvn90+5G0rJxJUi4uDI10JAe6ZVd3XfOMPd606R4cUJ2ZawGYFpbcS0AUEc1mhfr5T9rXP4Dg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mTijVk/C/W5NBP8gb/Z+NqcnTzAE7xLGcKCkO022sBD8mb2gpxANvPcEdtAcRMspvB6b2+/mfHEx5AQ2cT2w0SYe1w4W2jXqRTA+sq/wrpa2A0sUm3N0urmGg3KEWntjVn1ATD7Ei5x9LmC6pbniGHZzjjJQPOVCcR+ba+YmofxE/WbqPQrLJtM8YfpU8eM89ugOVG1dS7qQCN61Gs7uaO9x9Dd7cxcYHB+VIoWRjtqWerqk6VdUyE1oW1xXtSvabnP9XVMdU/UANAvx6jULgtVSQWV6k3/BZm4Sfa4PFt+PNwiVEoo1BsdCHNWFmZ6N/m+BRDtGu0wNTOfIk71fkg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Andrew Cooper <amc96@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 14 Jun 2023 09:37:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.06.2023 11:21, Andrew Cooper wrote:
> On 14/06/2023 7:52 am, Jan Beulich wrote:
>> On 13.06.2023 21:47, Roberto Bagnara wrote:
>>> On 13/06/23 19:45, Andrew Cooper wrote:
>>>> On 13/06/2023 6:39 pm, Julien Grall wrote:
>>>>> Hi,
>>>>>
>>>>> On 13/06/2023 17:22, Andrew Cooper wrote:
>>>>>> These are disliked specifically by MISRA, but they also interfere
>>>>>> with code
>>>>> Please explicitly name the rule.
>>>> I can't remember it off the top of my head.
>>>>
>>>> Stefano/Bertrand?
>>> Rule 2.1
>> That's about unreachable code, but inside the constructs there's nothing
>> that's unreachable afaics. Plus expanding "manually" them wouldn't change
>> reachability, would it?
> 
> I bet it's complaining about the while() after the goto.
> 
> I can see why things end up caring - because this violation can only be
> spotted in the fully-preprocessed source where the macro-ness has gone
> away, and *then* applying blanket rules.

Hmm, perhaps.

> Which comes back to the original point I made on the call yesterday that
> do{}while(0) correctness for macros is far more important than some,
> honestly suspect, claim about the resulting code being somehow "better"
> without the macro safety.

Even further I would claim that the while(0) part of the construct isn't
unreachable code simply because it doesn't result in any code being
generated. But of course "code" here may mean "source code", not the
resulting binary representation.

Jan



 


Rackspace

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