[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 02/21] IOMMU: simplify unmap-on-error in iommu_map()
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 3 May 2022 16:37:29 +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=XiM3v9ehxjalEdyydAEZPE86Myb11PHYx6eUAjSqLm4=; b=OJ/9+U9mR71xAhnYCbp39sSm+kQ8C2cy47sxaiyM0Csjm71g7Ca512FAL7nlURmkMv6TlVeAOSR9gueaSh3sBa+W1GnyEEs2DUXF8RP89td9HVXQl4lKOCNfz0TM6EijuUd6moAaAgUOhTjGoWj3kWprZauzGc39E0f4qZKiiwbKMdffo9otZ3MdmxQ4z3NE1r2LPX6YIUfTGDaENLxMAlTZYSkL3MOwZeOBoLnC0YUjHo9nKUzWF441RzuFIyHmc8BNNZlpZDa9rNE3GIxbqVXd3mJII7RAXryA8S7dvdyne34wVYZo70G8LyJv0ZDxMj7JAFHdCFkRnzgopcTkwg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E+lG2EtKWRw33VME8fdCG1tsjBL4NHdNWk2vzJlQmwGNB4lA8Ci1MfuRuf/x4DoL7yg+5JQGoS3As2CZUKxgt8VFDkI1cF9r7SQxwMJzZNFMsRSVS5ha/SipulVab5Fpbq43JrzwhIM6pPacwUSbqgrr6KtzwjGA+3N45C44eO3c+q9KNXmUWxHYjmB93Y7REJPtjTYTvtP44AAGMqD8IATqc2RcAG5LwOE8B4iglti57zVelsekoTQ/+uaqYZQn3lHUdRJyoewO4D6wUwKtc/ZS+8ZzcB8TC2ZQaJ7/PtFXhDPu8WGK3A/bkHEPv8+KgS1WVz8gNtEBTQUI58FylA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
- Delivery-date: Tue, 03 May 2022 14:37:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 03.05.2022 12:25, Roger Pau Monné wrote:
> On Mon, Apr 25, 2022 at 10:32:10AM +0200, Jan Beulich wrote:
>> As of 68a8aa5d7264 ("iommu: make map and unmap take a page count,
>> similar to flush") there's no need anymore to have a loop here.
>>
>> Suggested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks.
> I wonder whether we should have a macro to ignore returns from
> __must_check attributed functions. Ie:
>
> #define IGNORE_RETURN(exp) while ( exp ) break;
>
> As to avoid confusion (and having to reason) whether the usage of
> while is correct. I always find it confusing to assert such loop
> expressions are correct.
I've been considering some form of wrapper macro (not specifically
the one you suggest), but I'm of two minds: On one hand I agree it
would help readers, but otoh I fear it may make it more attractive
to actually override the __must_check (which really ought to be an
exception).
Jan
|