diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2016-02-16 00:46:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 14:33:11 -0800 |
commit | d2a13989d2e29b1f4cb38b50462e047cb935e96b (patch) | |
tree | bf86eb6303095244e242e00ef51ca31465006490 /drivers/staging/lustre/lustre/include/linux/obd.h | |
parent | staging/lustre/lclient: Adjust NULL comparison codestyle (diff) | |
download | linux-dev-d2a13989d2e29b1f4cb38b50462e047cb935e96b.tar.xz linux-dev-d2a13989d2e29b1f4cb38b50462e047cb935e96b.zip |
staging/lustre/include: Adjust NULL comparison codestyle
All instances of "x == NULL" are changed to "!x" and
"x != NULL" to "x"
Also remove some redundant assertions.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/include/linux/obd.h')
-rw-r--r-- | drivers/staging/lustre/lustre/include/linux/obd.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/include/linux/obd.h b/drivers/staging/lustre/lustre/include/linux/obd.h index 468bc28be895..240947b74590 100644 --- a/drivers/staging/lustre/lustre/include/linux/obd.h +++ b/drivers/staging/lustre/lustre/include/linux/obd.h @@ -73,7 +73,7 @@ static inline void __client_obd_list_lock(client_obd_lock_t *lock, while (1) { if (spin_trylock(&lock->lock)) { - LASSERT(lock->task == NULL); + LASSERT(!lock->task); lock->task = current; lock->func = func; lock->line = line; @@ -85,7 +85,7 @@ static inline void __client_obd_list_lock(client_obd_lock_t *lock, time_before(lock->time + 5 * HZ, jiffies)) { struct task_struct *task = lock->task; - if (task == NULL) + if (!task) continue; LCONSOLE_WARN("%s:%d: lock %p was acquired by <%s:%d:%s:%d> for %lu seconds.\n", @@ -108,7 +108,7 @@ static inline void __client_obd_list_lock(client_obd_lock_t *lock, static inline void client_obd_list_unlock(client_obd_lock_t *lock) { - LASSERT(lock->task != NULL); + LASSERT(lock->task); lock->task = NULL; lock->time = jiffies; spin_unlock(&lock->lock); |