diff options
author | Arnd Bergmann | 2015-05-20 00:07:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-05-31 02:42:27 +0200 |
commit | 7f804436fbd32c9784a2ae5324e64f9d4717c898 (patch) | |
tree | 14c4d6b2725a9c03f7566dd4136565afd1d10eee | |
parent | staging: lustre: lnet: remove LNET_MUTEX_LOCK macro (diff) | |
download | kernel-qcow2-linux-7f804436fbd32c9784a2ae5324e64f9d4717c898.tar.gz kernel-qcow2-linux-7f804436fbd32c9784a2ae5324e64f9d4717c898.tar.xz kernel-qcow2-linux-7f804436fbd32c9784a2ae5324e64f9d4717c898.zip |
staging: lustre: remove unused variable warning
A recent patch to simplify the lustre large memory allocation
causes new warnings as an unintended side-effect:
lustre/lov/lov_request.c: In function 'lov_finish_set':
lustre/lov/lov_request.c:78:7: warning: unused variable 'len' [-Wunused-variable]
int len = set->set_oabufs * sizeof(*set->set_pga);
^
lustre/obdclass/acl.c: In function 'lustre_ext_acl_xattr_reduce_space':
lustre/obdclass/acl.c:123:6: warning: unused variable 'old_size' [-Wunused-variable]
int old_size = CFS_ACL_XATTR_SIZE(old_count, ext_acl_xattr);
^
The reason is that the 'size' argument to OBD_FREE_LARGE()
is never needed, which was previously hidden by the extra
abstractions.
This avoids the warnings by adding a cast to void, to tell
the compiler that the argument is intentionally unused.
A better fix is probably to remove the entire set of allocation
macros and open-code the normal kernel interface calls.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 99d56ff7c1c ("staging/lustre: Always try kmalloc first for OBD_ALLOC_LARGE")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/include/obd_support.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index 379266d6bcd9..c0136ee778e3 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -688,6 +688,7 @@ do { \ #define OBD_FREE_LARGE(ptr, size) \ do { \ + (void)(size); \ kvfree(ptr); \ } while (0) |