diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2016-02-16 00:46:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 14:33:11 -0800 |
commit | 6ac49ca56269cdb9772d8afec203887dbf302112 (patch) | |
tree | 79e89f709d8ec3ea2a629c8b30fd95b90508c113 /drivers/staging/lustre/lustre/fld/fld_cache.c | |
parent | staging/lustre/fid: Adjust NULL comparison codestyle (diff) | |
download | linux-dev-6ac49ca56269cdb9772d8afec203887dbf302112.tar.xz linux-dev-6ac49ca56269cdb9772d8afec203887dbf302112.zip |
staging/lustre/fld: Adjust NULL comparison codestyle
All instances of "x == NULL" are changed to "!x" and
"x != NULL" to "x"
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/fld/fld_cache.c')
-rw-r--r-- | drivers/staging/lustre/lustre/fld/fld_cache.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c b/drivers/staging/lustre/lustre/fld/fld_cache.c index d9459e58e2ce..a7026a948e92 100644 --- a/drivers/staging/lustre/lustre/fld/fld_cache.c +++ b/drivers/staging/lustre/lustre/fld/fld_cache.c @@ -65,7 +65,7 @@ struct fld_cache *fld_cache_init(const char *name, { struct fld_cache *cache; - LASSERT(name != NULL); + LASSERT(name); LASSERT(cache_threshold < cache_size); cache = kzalloc(sizeof(*cache), GFP_NOFS); @@ -100,7 +100,7 @@ void fld_cache_fini(struct fld_cache *cache) { __u64 pct; - LASSERT(cache != NULL); + LASSERT(cache); fld_cache_flush(cache); if (cache->fci_stat.fst_count > 0) { @@ -218,8 +218,6 @@ static int fld_cache_shrink(struct fld_cache *cache) struct list_head *curr; int num = 0; - LASSERT(cache != NULL); - if (cache->fci_cache_count < cache->fci_cache_size) return 0; @@ -414,7 +412,7 @@ static int fld_cache_insert_nolock(struct fld_cache *cache, } } - if (prev == NULL) + if (!prev) prev = head; CDEBUG(D_INFO, "insert range "DRANGE"\n", PRANGE(&f_new->fce_range)); @@ -499,7 +497,7 @@ int fld_cache_lookup(struct fld_cache *cache, cache->fci_stat.fst_count++; list_for_each_entry(flde, head, fce_list) { if (flde->fce_range.lsr_start > seq) { - if (prev != NULL) + if (prev) *range = prev->fce_range; break; } |