OSDN Git Service

staging: lustre: remove the CFS_HOP() macro
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 Jan 2015 07:49:54 +0000 (10:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:15 +0000 (19:59 +0800)
commit052f4f61ecb14119709f928984c347ef6a2ec35c
tree1d5c351facf616d3eed7cdafae6e2b891fa1bc95
parentf8bd34d21622c4550179aeb28715c2fd35e82451
staging: lustre: remove the CFS_HOP() macro

CFS_HOP() is a terrible macro.  It chops the struct member name in half
so that it's not possible to use tools like grep or to search for how
a function pointer is used.

I removed a couple calls to:

LASSERT(CFS_HOP(hs, put_locked) != NULL);

because they isn't a need for them.  Anyway dereferencing a NULL pointer
generates a pretty good stack trace already without adding extra debug
code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
drivers/staging/lustre/lustre/libcfs/hash.c