diff options
author | James Simmons <jsimmons@infradead.org> | 2016-02-12 12:06:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-14 16:20:32 -0800 |
commit | 5fd88337d209d5948ab86b6dfca968dbb29ef89a (patch) | |
tree | 97a65591d872290e2893d6e3f17d87352261b038 /drivers/staging/lustre/lnet/selftest/timer.c | |
parent | 06ace26edc140034c7f340bf41b9a2f8cbb2a3ba (diff) | |
download | linux-5fd88337d209d5948ab86b6dfca968dbb29ef89a.tar.bz2 |
staging: lustre: fix all conditional comparison to zero in LNet layer
Doing if (rc != 0) or if (rc == 0) is bad form. This patch corrects
the LNet code to behavior according to kernel coding standards.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest/timer.c')
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/timer.c b/drivers/staging/lustre/lnet/selftest/timer.c index dce5137c7dfe..c89137182eee 100644 --- a/drivers/staging/lustre/lnet/selftest/timer.c +++ b/drivers/staging/lustre/lnet/selftest/timer.c @@ -218,7 +218,7 @@ stt_startup(void) stt_data.stt_nthreads = 0; init_waitqueue_head(&stt_data.stt_waitq); rc = stt_start_timer_thread(); - if (rc != 0) + if (rc) CERROR("Can't spawn timer thread: %d\n", rc); return rc; @@ -237,7 +237,7 @@ stt_shutdown(void) stt_data.stt_shuttingdown = 1; wake_up(&stt_data.stt_waitq); - lst_wait_until(stt_data.stt_nthreads == 0, stt_data.stt_lock, + lst_wait_until(!stt_data.stt_nthreads, stt_data.stt_lock, "waiting for %d threads to terminate\n", stt_data.stt_nthreads); |