[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190204210101.61733-1-cai@lca.pw>
Date: Mon, 4 Feb 2019 16:01:01 -0500
From: Qian Cai <cai@....pw>
To: ard.biesheuvel@...aro.org
Cc: gregkh@...uxfoundation.org, catalin.marinas@....com,
linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
Qian Cai <cai@....pw>
Subject: [PATCH -next] efi/arm64: return zero from ptdump_init()
The commit e2a2e56e4082 ("arm64: dump: no need to check return value of
debugfs_create functions") converted ptdump_debugfs_register() from
void, but forgot to fix the efi version of ptdump_init().
drivers/firmware/efi/arm-runtime.c: In function 'ptdump_init':
drivers/firmware/efi/arm-runtime.c:52:9: error: void value not ignored as it ought to be
52 | return ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/efi/arm-runtime.c:53:1: warning: control reaches end of non-void function [-Wreturn-type]
Fixes: e2a2e56e4082 ("arm64: dump: no need to check return value of debugfs_create functions")
Signed-off-by: Qian Cai <cai@....pw>
---
drivers/firmware/efi/arm-runtime.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
index 352bd2473162..b308f5bb3737 100644
--- a/drivers/firmware/efi/arm-runtime.c
+++ b/drivers/firmware/efi/arm-runtime.c
@@ -46,10 +46,10 @@ static struct ptdump_info efi_ptdump_info = {
static int __init ptdump_init(void)
{
- if (!efi_enabled(EFI_RUNTIME_SERVICES))
- return 0;
+ if (efi_enabled(EFI_RUNTIME_SERVICES))
+ ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables");
- return ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables");
+ return 0;
}
device_initcall(ptdump_init);
--
2.17.2 (Apple Git-113)
Powered by blists - more mailing lists