diff mbox series

[2/2] selftests: fix an unused variable warning in pidfd selftest

Message ID 20220324223929.1893741-2-axelrasmussen@google.com (mailing list archive)
State Accepted
Commit 187816d07729ff88e75d84efbc668642106cebf3
Headers show
Series [1/2] selftests: fix header dependency for pid_namespace selftests | expand

Commit Message

Axel Rasmussen March 24, 2022, 10:39 p.m. UTC
I fixed a few warnings like this in commit e2aa5e650b07
("selftests: fixup build warnings in pidfd / clone3 tests"), but I
missed this one by mistake. Since this variable is unused, remove it.

Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
---
 tools/testing/selftests/pidfd/pidfd_wait.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Christian Brauner March 25, 2022, 3:21 p.m. UTC | #1
On Thu, Mar 24, 2022 at 03:39:29PM -0700, Axel Rasmussen wrote:
> I fixed a few warnings like this in commit e2aa5e650b07
> ("selftests: fixup build warnings in pidfd / clone3 tests"), but I
> missed this one by mistake. Since this variable is unused, remove it.
> 
> Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
> ---

Looks good,
Reviewed-by: Christian Brauner <brauner@kernel.org>
Shuah Khan March 25, 2022, 7:50 p.m. UTC | #2
On 3/25/22 9:21 AM, Christian Brauner wrote:
> On Thu, Mar 24, 2022 at 03:39:29PM -0700, Axel Rasmussen wrote:
>> I fixed a few warnings like this in commit e2aa5e650b07
>> ("selftests: fixup build warnings in pidfd / clone3 tests"), but I
>> missed this one by mistake. Since this variable is unused, remove it.
>>
>> Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
>> ---
> 
> Looks good,
> Reviewed-by: Christian Brauner <brauner@kernel.org>
> 

Thank you both. Will apply it for Linux 5.18-rc2.

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/selftests/pidfd/pidfd_wait.c b/tools/testing/selftests/pidfd/pidfd_wait.c
index 17999e082aa7..070c1c876df1 100644
--- a/tools/testing/selftests/pidfd/pidfd_wait.c
+++ b/tools/testing/selftests/pidfd/pidfd_wait.c
@@ -95,7 +95,6 @@  TEST(wait_states)
 		.flags = CLONE_PIDFD | CLONE_PARENT_SETTID,
 		.exit_signal = SIGCHLD,
 	};
-	int ret;
 	pid_t pid;
 	siginfo_t info = {
 		.si_signo = 0,