[SRU][Xenial] UBUNTU: SAUCE: powerpc/fadump: fix wrong function return in the backport

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][Xenial] UBUNTU: SAUCE: powerpc/fadump: fix wrong function return in the backport

Kleber Souza
BugLink: https://bugs.launchpad.net/bugs/1792419

The 4.4.y stable backport c9fadf27006b for upstream commit 1bd6a1c4b80a
("powerpc/fadump: handle crash memory ranges array index overflow")
introduces a build failure on ppc by returning a int in a void function.
In 4.4.y register_fadump() returns void because 98b8cd7f7564
("powerpc/fadump: Return error when fadump registration fails") hasn't
been backported for this stable release.

Fixes: c9fadf27006b ("powerpc/fadump: handle crash memory ranges array index overflow")
Signed-off-by: Kleber Sacilotto de Souza <[hidden email]>
---
 arch/powerpc/kernel/fadump.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 4e71df4048a9..69c8090e5399 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1001,7 +1001,6 @@ static void register_fadump(void)
 {
  unsigned long addr;
  void *vaddr;
- int ret;
 
  /*
  * If no memory is reserved then we can not register for firmware-
@@ -1010,9 +1009,8 @@ static void register_fadump(void)
  if (!fw_dump.reserve_dump_area_size)
  return;
 
- ret = fadump_setup_crash_memory_ranges();
- if (ret)
- return ret;
+ if (fadump_setup_crash_memory_ranges())
+ return;
 
  addr = be64_to_cpu(fdm.rmr_region.destination_address) + be64_to_cpu(fdm.rmr_region.source_len);
  /* Initialize fadump crash info header. */
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

NAK: [SRU][Xenial] UBUNTU: SAUCE: powerpc/fadump: fix wrong function return in the backport

Kleber Souza
On 10/02/18 15:25, Kleber Sacilotto de Souza wrote:

> BugLink: https://bugs.launchpad.net/bugs/1792419
>
> The 4.4.y stable backport c9fadf27006b for upstream commit 1bd6a1c4b80a
> ("powerpc/fadump: handle crash memory ranges array index overflow")
> introduces a build failure on ppc by returning a int in a void function.
> In 4.4.y register_fadump() returns void because 98b8cd7f7564
> ("powerpc/fadump: Return error when fadump registration fails") hasn't
> been backported for this stable release.
>
> Fixes: c9fadf27006b ("powerpc/fadump: handle crash memory ranges array index overflow")
> Signed-off-by: Kleber Sacilotto de Souza <[hidden email]>
> ---
>  arch/powerpc/kernel/fadump.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index 4e71df4048a9..69c8090e5399 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -1001,7 +1001,6 @@ static void register_fadump(void)
>  {
>   unsigned long addr;
>   void *vaddr;
> - int ret;
>  
>   /*
>   * If no memory is reserved then we can not register for firmware-
> @@ -1010,9 +1009,8 @@ static void register_fadump(void)
>   if (!fw_dump.reserve_dump_area_size)
>   return;
>  
> - ret = fadump_setup_crash_memory_ranges();
> - if (ret)
> - return ret;
> + if (fadump_setup_crash_memory_ranges())
> + return;
>  
>   addr = be64_to_cpu(fdm.rmr_region.destination_address) + be64_to_cpu(fdm.rmr_region.source_len);
>   /* Initialize fadump crash info header. */
>

As discussed offline, the best approach would be to backport
"powerpc/fadump: Return error when fadump registration fails" to fix
this build error. I'll send another patch shortly.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team