diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-02-01 14:20:01 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2019-02-04 11:53:30 -0500 |
commit | 67f52a9540e08d3fd98d6588d75d0eb9157b2534 (patch) | |
tree | bc6019cb0271d4400d002936471e03f4c07b8fa2 | |
parent | d0a060be573bfbf8753a15dca35497db5e968bb0 (diff) |
efi/arm: Don't expect a return value of ptdump_debugfs_register
As of commit e2a2e56e4082 ("arm64: dump: no need to check return value
of debugfs_create functions") in the arm64 for-next/core branch,
ptdump_debugfs_register does not have a return value, which causes a
build error here:
drivers/firmware/efi/arm-runtime.c:51:9: error: returning 'void' from a
function with incompatible result type 'int'
return ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
The arm version is still awaiting acceptance [1] but in anticipation
of that patch being merged, restructure this function to call
ptdump_debugfs_register without expecting a return value.
[1]: https://lore.kernel.org/lkml/20190122144114.9816-3-gregkh@linuxfoundation.org/
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | drivers/firmware/efi/arm-runtime.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 23ea1ed409d1..7ae3b797caf8 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c | |||
@@ -45,10 +45,10 @@ static struct ptdump_info efi_ptdump_info = { | |||
45 | 45 | ||
46 | static int __init ptdump_init(void) | 46 | static int __init ptdump_init(void) |
47 | { | 47 | { |
48 | if (!efi_enabled(EFI_RUNTIME_SERVICES)) | 48 | if (efi_enabled(EFI_RUNTIME_SERVICES)) |
49 | return 0; | 49 | ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables"); |
50 | 50 | ||
51 | return ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables"); | 51 | return 0; |
52 | } | 52 | } |
53 | device_initcall(ptdump_init); | 53 | device_initcall(ptdump_init); |
54 | 54 | ||