* [PATCH] efi/arm: Don't expect a return value of ptdump_debugfs_register
@ 2019-02-01 19:20 Nathan Chancellor
2019-02-01 22:18 ` Ard Biesheuvel
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2019-02-01 19:20 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Greg Kroah-Hartman, linux-efi, linux-kernel, Nathan Chancellor
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/
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
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 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 = {
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.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] efi/arm: Don't expect a return value of ptdump_debugfs_register
2019-02-01 19:20 [PATCH] efi/arm: Don't expect a return value of ptdump_debugfs_register Nathan Chancellor
@ 2019-02-01 22:18 ` Ard Biesheuvel
2019-02-04 13:44 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2019-02-01 22:18 UTC (permalink / raw)
To: Nathan Chancellor, linux-arm-kernel, Will Deacon, Catalin Marinas
Cc: Greg Kroah-Hartman, linux-efi, Linux Kernel Mailing List
On Fri, 1 Feb 2019 at 20:21, Nathan Chancellor <natechancellor@gmail.com> wrote:
>
> 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/
>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Catalin, Will,
Could you please apply this directly?
> ---
> 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 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 = {
>
> 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.20.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] efi/arm: Don't expect a return value of ptdump_debugfs_register
2019-02-01 22:18 ` Ard Biesheuvel
@ 2019-02-04 13:44 ` Will Deacon
0 siblings, 0 replies; 3+ messages in thread
From: Will Deacon @ 2019-02-04 13:44 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Nathan Chancellor, linux-arm-kernel, Catalin Marinas,
Greg Kroah-Hartman, linux-efi, Linux Kernel Mailing List
On Fri, Feb 01, 2019 at 11:18:22PM +0100, Ard Biesheuvel wrote:
> On Fri, 1 Feb 2019 at 20:21, Nathan Chancellor <natechancellor@gmail.com> wrote:
> >
> > 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/
> >
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
>
> Catalin, Will,
>
> Could you please apply this directly?
Sure, we'll pick it up.
Will
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-04 13:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-01 19:20 [PATCH] efi/arm: Don't expect a return value of ptdump_debugfs_register Nathan Chancellor
2019-02-01 22:18 ` Ard Biesheuvel
2019-02-04 13:44 ` Will Deacon
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).