From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0942DC433FE for ; Tue, 15 Nov 2022 22:57:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.444072.698871 (Exim 4.92) (envelope-from ) id 1ov4rK-00066c-EK; Tue, 15 Nov 2022 22:56:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 444072.698871; Tue, 15 Nov 2022 22:56:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ov4rK-00066V-BV; Tue, 15 Nov 2022 22:56:50 +0000 Received: by outflank-mailman (input) for mailman id 444072; Tue, 15 Nov 2022 22:56:49 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ov4rI-00066P-Vf for xen-devel@lists.xenproject.org; Tue, 15 Nov 2022 22:56:49 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ov4rI-0001Fh-F3; Tue, 15 Nov 2022 22:56:48 +0000 Received: from gw1.octic.net ([88.97.20.152] helo=[10.0.1.102]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ov4rI-0005Aa-74; Tue, 15 Nov 2022 22:56:48 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=fq4nNfBNqxj8n04a0kntCAL9h5BKL/74tHeb8x8CfeM=; b=ekgyROhEeXhyBDyEacmDBPWGIe y/+y7Yrfj+F2f+GQAp1/CrgroPiqq4P6j8QbjmaR5ufKX/+yx0LDT2Ka/+VDc+PXVsZxVelUbUE8c wN6DaqRCYlI3+4dXGugnlW8RWwC5vm4k7pGF+j4gsR6yL+x0D2hRa2Md2DpQg1wIiGwY=; Message-ID: Date: Tue, 15 Nov 2022 22:56:45 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] xen/notifier: simplify using notifier_[to|from]_errno() To: Juergen Gross , xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Dario Faggioli References: <20221028114111.8150-1-jgross@suse.com> From: Julien Grall In-Reply-To: <20221028114111.8150-1-jgross@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Juergen, On 28/10/2022 12:41, Juergen Gross wrote: > Today all users of notifier_from_errno() and notifier_to_errno() are > Handling the success case the same way, by using > > !rc ? NOTIFY_DONE : notifier_from_errno(rc) > > or > > (notifier_rc == NOTIFY_DONE) ? 0 : notifier_to_errno(notifier_rc); > > Simplify the use cases by moving the handling of the success case into > the functions. > > Signed-off-by: Juergen Gross Acked-by: Julien Grall Cheers, -- Julien Grall