From patchwork Thu Aug 17 16:57:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 802744 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xYC8R5JkQz9t4R for ; Fri, 18 Aug 2017 02:58:15 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7D628C21F9F; Thu, 17 Aug 2017 16:58:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C6327C21EA8; Thu, 17 Aug 2017 16:58:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 97888C21EA8; Thu, 17 Aug 2017 16:58:07 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lists.denx.de (Postfix) with ESMTPS id 3AC3FC21DE7 for ; Thu, 17 Aug 2017 16:58:07 +0000 (UTC) Received: from workstation4.fritz.box ([84.118.154.110]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0M2FhY-1dPUK10dwS-00s3IM; Thu, 17 Aug 2017 18:58:05 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Thu, 17 Aug 2017 18:57:36 +0200 Message-Id: <20170817165736.12093-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.11.0 X-Provags-ID: V03:K0:uvZYxKPQCOHOt68l4GdOMxCSSp7yBf27lHg62k/RuNobB5Fxwrh F2zrpi1Il/wtLlw4IUxtgSA0iTFwtFDazF1rVDi8/2iL2zLrJEiKhW8bs1f55xoRKb1hiyP If7i9NfMSYg/QLFuSsz3GMQgiKfvWTA6tUASyjNCsTXaq9F33BhITrY5o6t6RtzFxlUfchg brc/6okSYbBN/pT/esKSQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Z9vQxppD094=:D7sG6mb6HMj9XEhJgU61AC k9ojdfJGdx0TMed0mapsmbh04JKm9TlS7RBLbAHZ6a2a1FOFD5eqO4swoPqQ1f/JPpUkvbiwv UJwNM8YuP4NHfjzklLbSPSGX1G3/85C+Hh/Oc9/DkZndGfR9VJKNtZ1q1q2AHIyirHfiDBKsm p815uVjjk3Bp5jkXpMwCVmdhcTt6wRvovHS79HhBF0xdFAhMoTfDuirAE6NZTQT6iqKG4sgKi F0bJS3F9w0xxXVNuwmagyB39a4QwZ3HYpbVU81KDi3JEipUyrY4cd+Cz0WrVOSOyBdjL8w/er 2/ZN6MzWVKnNrmTRFqxr2gykumr8xfrV7iR/x8qy6b2UwA+US/G0PE6JDs01RwNlg3Ljwu11H Dc9GeLs2q7ETEBfr/BSjzP+MqIMv0UE6I9zvl3/sWR+WwQIh4aQuGAo2kPJaepq0xFwtCCiVA /xkEkwYedtw6lqdeW37zizxVpZ12Otb/utqqX0ET5YUcd+kBtZaTyP0wCnIHx8cCKtm6pENMx nKPMg4lC++HxpIsLVbhW+LYGMaoPc+caUxPRro+gEQO0dVHn1KiQbQgeCaWbh35DkqGQBDbSm uu3ldyFBvesM0O90SJuFmplIa97Jq2XBm/M65/knOrx40TtKrXWTqhxzpITrG6RHJy9URwtZl RiUtfsY+YK5/AIvgP29Zo/b6EHMBGrYwkiYakYkOYsP9BKG4q6oVjb4RqfWzb5NTWRTxb/leU nYBpVj6Bho+oYqj5LBVfgwohMnttqKDu2PZnNYUFTbSaqJcdlNLfu46a7ZoOnQx9ShFGv8BlU Q/ITocruTjTIFClaiuLHDVj/49IIw== Cc: u-boot@lists.denx.de, Heinrich Schuchardt Subject: [U-Boot] [PATCH 1/1] efi_loader: do not cast return value in EFI_EXIT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" UEFI API functions have different return types. Some return a value of type EFI_STATUS other don't. We therefore should not cast the return value of EFI_EXIT to another type than the expression passed to EFI_EXIT. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 9cd55bf47b..1effced59a 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -33,9 +33,9 @@ const char *__efi_nesting_dec(void); * Exit the u-boot world back to UEFI: */ #define EFI_EXIT(ret) ({ \ - efi_status_t _r = ret; \ + typeof(ret) _r = ret; \ debug("%sEFI: Exit: %s: %u\n", __efi_nesting_dec(), \ - __func__, (u32)(_r & ~EFI_ERROR_MASK)); \ + __func__, (u32)((uintptr_t) _r & ~EFI_ERROR_MASK)); \ assert(__efi_exit_check()); \ _r; \ })