* [PATCH -next] efi/arm64: return zero from ptdump_init()
@ 2019-02-04 21:01 Qian Cai
2019-02-05 9:27 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Qian Cai @ 2019-02-04 21:01 UTC (permalink / raw)
To: ard.biesheuvel; +Cc: gregkh, catalin.marinas, linux-efi, linux-kernel, Qian Cai
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@lca.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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] efi/arm64: return zero from ptdump_init()
2019-02-04 21:01 [PATCH -next] efi/arm64: return zero from ptdump_init() Qian Cai
@ 2019-02-05 9:27 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2019-02-05 9:27 UTC (permalink / raw)
To: Qian Cai; +Cc: ard.biesheuvel, gregkh, linux-efi, linux-kernel
On Mon, Feb 04, 2019 at 04:01:01PM -0500, Qian Cai wrote:
> 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@lca.pw>
A fix is already in -next (commit 67f52a9540e0).
--
Catalin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-05 9:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 21:01 [PATCH -next] efi/arm64: return zero from ptdump_init() Qian Cai
2019-02-05 9:27 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).