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 X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 636F3C43603 for ; Fri, 6 Dec 2019 16:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A5E521835 for ; Fri, 6 Dec 2019 16:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575651374; bh=UZGvL4jeZEg7v1KznTKj27qPrtUjbbX1pS2KQDwlrqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qrUNAKNnBy4FMnJNp6/36h1pqnPMUURjwVZx7oGPBSNK4kp7Xz/tmU0iiaeh59Nd4 SvIHsLF/KQ99pBdCeY7fwPryI+RWTf6//Vof5JY4Bez2CvdIclYp9IfugEafOax3ra 6LzMlFDe/XRvlyYTgMKCOr1f6yCdtzyFUIcn2dpE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726688AbfLFQ4M (ORCPT ); Fri, 6 Dec 2019 11:56:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:51002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbfLFQ4L (ORCPT ); Fri, 6 Dec 2019 11:56:11 -0500 Received: from e123331-lin.cambridge.arm.com (fw-tnat-cam5.arm.com [217.140.106.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0AD31206DF; Fri, 6 Dec 2019 16:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575651370; bh=UZGvL4jeZEg7v1KznTKj27qPrtUjbbX1pS2KQDwlrqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RDWJxga79Vepr06y1ty8MERowKGtQ9+oa2cWgtNaYQbtcLQ/l2F1B4gfzPNvh5IXj AmsMOTcI8F2iXuXvgF1OHpIrLpFvO86OXvEIoO0SPfZb8yUaGwAP4s1P66BLh3vea/ Qors0ex1FG1ZuQdM7HM4EhI/r/HLX3mZw0ztW2U0= From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Andy Shevchenko , Arvind Sankar , Bhupesh Sharma , Masayoshi Mizuma Subject: [PATCH 5/6] efi: fix type of unload field in efi_loaded_image_t Date: Fri, 6 Dec 2019 16:55:41 +0000 Message-Id: <20191206165542.31469-6-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191206165542.31469-1-ardb@kernel.org> References: <20191206165542.31469-1-ardb@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arvind Sankar The unload field is a function pointer, so it should be u32 for 32-bit, u64 for 64-bit. Add a prototype for it in the native efi_loaded_image_t type. Also change type of parent_handle and device_handle from void* to efi_handle_t for documentation purposes. The unload method is not used, so no functional change. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel --- include/linux/efi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/efi.h b/include/linux/efi.h index 99dfea595c8c..aa54586db7a5 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -824,7 +824,7 @@ typedef struct { __aligned_u64 image_size; unsigned int image_code_type; unsigned int image_data_type; - unsigned long unload; + u32 unload; } efi_loaded_image_32_t; typedef struct { @@ -840,14 +840,14 @@ typedef struct { __aligned_u64 image_size; unsigned int image_code_type; unsigned int image_data_type; - unsigned long unload; + u64 unload; } efi_loaded_image_64_t; typedef struct { u32 revision; - void *parent_handle; + efi_handle_t parent_handle; efi_system_table_t *system_table; - void *device_handle; + efi_handle_t device_handle; void *file_path; void *reserved; u32 load_options_size; @@ -856,7 +856,7 @@ typedef struct { __aligned_u64 image_size; unsigned int image_code_type; unsigned int image_data_type; - unsigned long unload; + efi_status_t (*unload)(efi_handle_t image_handle); } efi_loaded_image_t; -- 2.17.1