[PATCH] drmgr/pci: Return 0 for success from do_replace()

4 views
Skip to first unread message

Haren Myneni

<haren@linux.ibm.com>
unread,
Feb 15, 2025, 12:43:49 AMFeb 15
to powerpc-utils-devel@googlegroups.com, tyreld@linux.ibm.com, hbabu@us.ibm.com, haren@linux.ibm.com
Added replace_add_work() in commit f40a63b15c563 to support
replacement node and the partner node. But this function returns
0 for user input and 1 for success which caused do_replace()
returns 1. This patch fixes the problem with return 0.

Fixes: f40a63b15c563 ("drmgr/pci: Add multipath partner device support for hotplug replace")
Signed-off-by: Haren Myneni <ha...@linux.ibm.com>
---
src/drmgr/drslot_chrp_pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/drmgr/drslot_chrp_pci.c b/src/drmgr/drslot_chrp_pci.c
index 4c41fcd..91c08e9 100644
--- a/src/drmgr/drslot_chrp_pci.c
+++ b/src/drmgr/drslot_chrp_pci.c
@@ -1051,9 +1051,10 @@ static int do_replace(struct dr_node *all_nodes)
}

usr_prompt = prompt_save;
+ return rc;
}

- return rc;
+ return 0;
}

int valid_pci_options(void)
--
2.43.5

Tyrel Datwyler

<tyreld@linux.ibm.com>
unread,
Feb 25, 2025, 5:01:39 PMFeb 25
to Haren Myneni, powerpc-utils-devel@googlegroups.com, hbabu@us.ibm.com
On 2/14/25 9:43 PM, Haren Myneni wrote:
> Added replace_add_work() in commit f40a63b15c563 to support
> replacement node and the partner node. But this function returns
> 0 for user input and 1 for success which caused do_replace()
> returns 1. This patch fixes the problem with return 0.
>
> Fixes: f40a63b15c563 ("drmgr/pci: Add multipath partner device support for hotplug replace")
> Signed-off-by: Haren Myneni <ha...@linux.ibm.com>
> ---

Patch applied to powerpc-utils/next branch.

https://github.com/ibm-power-utilities/powerpc-utils/commit/3a8127ad7fe6615a8c6e8a3f0965addfdf888b38

Thanks,
-Tyrel
Reply all
Reply to author
Forward
0 new messages