summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/lnet/router.c
diff options
context:
space:
mode:
authorJohn L. Hammond <john.hammond@intel.com>2016-02-15 10:25:49 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-20 14:29:23 -0800
commit060c2820d0a73c092668957e6831720b83f44efa (patch)
tree3487275e024b3f04edac611f1dc262c16248b0c4 /drivers/staging/lustre/lnet/lnet/router.c
parent764d2e9aedb7b12555ecc60449169018bd2b7b9b (diff)
downloadlinux-0-day-060c2820d0a73c092668957e6831720b83f44efa.tar.gz
linux-0-day-060c2820d0a73c092668957e6831720b83f44efa.tar.xz
staging: lustre: remove uses of IS_ERR_VALUE()
Remove most uses of IS_ERR_VALUE(). This macro was often given an int argument coming from PTR_ERR(). This invokes implementation defined behavior since the long value gotten by applying PTR_ERR() to a kernel pointer will usually not be representable as an int. Moreover it may be just plain wrong to do this since the expressions IS_ERR(p) and IS_ERR_VALUE((int) PTR_ERR(p)) are not equivalent for a general pointer p. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3498 Reviewed-on: http://review.whamcloud.com/6759 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/router.c')
-rw-r--r--drivers/staging/lustre/lnet/lnet/router.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 9c32a01db3290..67566ca2db02b 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -1004,6 +1004,7 @@ lnet_ping_router_locked(lnet_peer_t *rtr)
int
lnet_router_checker_start(void)
{
+ struct task_struct *task;
int rc;
int eqsz;
@@ -1034,9 +1035,9 @@ lnet_router_checker_start(void)
}
the_lnet.ln_rc_state = LNET_RC_STATE_RUNNING;
- rc = PTR_ERR(kthread_run(lnet_router_checker,
- NULL, "router_checker"));
- if (IS_ERR_VALUE(rc)) {
+ task = kthread_run(lnet_router_checker, NULL, "router_checker");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
CERROR("Can't start router checker thread: %d\n", rc);
/* block until event callback signals exit */
down(&the_lnet.ln_rc_signal);