Commit graph

573843 commits

Author SHA1 Message Date
Chaehyun Lim
1dd44dda6e staging: wilc1000: fix return type of wilc_add_pkt declaration
This patch changes return type of wilc_add_pkt declaration from s32 to
int. The return type of this function declaration and definition should
be same as data type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:05:35 -08:00
Bhumika Goyal
364b72e500 Staging:lustre:lclient:Remove unused function
Discard the function ccc_vmpage_page_transient as it is not used
anywhere in the kernel.
Used grep to find occurences.
Problem found using sparse.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:45:36 -08:00
Bhumika Goyal
61382aa809 Staging:lustre:lustre:llite:Remove explicit NULL comparision
Replaced explicit NULL comparision with its simplier form.
Found using coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:44:02 -08:00
Bhumika Goyal
6ae07f1b38 Staging:lustre:obdclass:linux:simplify NULL comparison
Remove explicit NULL comparision and replace it with a simpier form.
Detected using checkpatch.pl.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:44:02 -08:00
Bhumika Goyal
197cb405b3 Staging:lustre:obdclass:linux:remove unnecessary braces
Fixed 'braces {} are not necessary for single statement blocks'
checkpatch.pl warning.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:44:02 -08:00
Sushuruth Sadagopan
587cb02269 staging: lustre: fix comment style
Fix style of several comments.

Signed-off-by: Sushuruth Sadagopan <sushsada@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:42:33 -08:00
Anjali Menon
9edece72e2 staging: lustre: lustre: lov: Added space
Added a spaces around '|' to fix the check detected by
checkpatch.pl

CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:42:33 -08:00
Bhumika Goyal
62fcd58943 Staging:lustre:lustre:obdclass:Remove return from void function
This patch removes the return statement at the end of a void function as
it is not necessary.This was found by checkpatch.pl .

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:42:33 -08:00
Parinay Kondekar
b0e7d96088 staging:lustre: remove obsolete comment in libcfs_ioctl.h
The libcfs_ioctl.h header has a comment about a snapshot ioctl
which has been removed for years. Lets remove the comment to
avoid confusion. Broken out of patch 17492.

Signed-off-by: Parinay Kondekar <parinay.kondekar@seagate.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844
Reviewed-on: http://review.whamcloud.com/17492
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:41:01 -08:00
Frank Zago
08816b2eb1 staging/lustre: Add __user annotations in lnetselftest code
This fixes a bunch of sparse warnings.

There is no code change.

Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11819
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5396
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:38:00 -08:00
Oleg Drokin
af00f6c5ac staging/lustre/llite: Update ll_dir_ioctl pointer casts with __user
When casting unsingned long userspace pointer from ioctl argument to
a pointer suitable for use with userspace access functions, need
to remember to add __user attribute, to make sparse happy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin
d47bb83b1b staging/lustre: Properly cast ll_getname argument to __user in ll_dir_ioctl
This makes sparse happy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin
7ec89fa54a staging/lustre: Properly cast ll_fid2path argument to __user in ll_dir_ioctl
This makes sparse happier.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin
61dad0ba9a staging/lustre: Properly cast ll_fid2path argument to __user in ll_file_ioctl
When calling ll_fid2path, it expects a userspace pointer.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin
02f9c12e32 staging/lustre/llite: Update all file.c user pointer casts to __user
unsigned long user address must be casted with __user attribute
to make sparse happy when used with userspace access functions.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin
11be8f6cdc staging/lustre: Mark lmv_hsm_ct_register/unregister uarg as __user
Since it is a userspace pointer, this makes things neater and
sparse happier.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin
0f881d7b26 staging/lustre: Properly mark lmv_fid2path uarg argment as __user
This makes sparse happy too.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
6f9a3bd93f staging/lustre/lloop: Properly mark userspace pointers in lo/lloop_ioctl
When casting unsigned long userspace pointer for use with
userspace-accessing functions, need to use __user attribute to make
sparse happy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
ec2d71d083 staging/lustre/osc: Mark osc_getstripe user pointer argument as __user
This shuts some sparse address space mismatch warnings

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
7ac5db212d staging/lustre/llite: Update llite_lib.c with proper __user attributes
Casts for get/put_user and copy_to/from_user should have __user
attribute for the userspace buffer address.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
55f37f01f9 staging/lustre: Declare lov_getstripe lump argument as __user
This is a user pointer, so that makes sparse a lot happier.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
9751424142 staging/lustre/llite: Fix improper userspace access in ll_fiemap
Cannot use memcpy, but use copy_to/from_user instead

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
4c6243ec84 staging/lustre/llite: Properly mark ll_obd_statfs argument as __user
Also update all callers.
This fixes a bunch of address space mismatch warnings from sparse.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
0dd48a43fd staging/lustre/osc: Do not use lprocfs_write_helper in sysfs store methods
sysfs store methods provide us with a kernel buffer already, but
lprocfs_write_helper is expecting a user buffer.
Replace lprocfs_write_helper with kstrto[u]int() calls instead in
contention_seconds_store() and lockless_truncate_store()

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
cadffe60ea staging/lustre: Declare lprocfs_write_frac_u64_helper argument as __user
The buffer that lprocfs_write_frac_u64_helper is working on is
presumed to be a userspace one, so it's not suitable for use
on kernel buffers.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:00 -08:00
Oleg Drokin
f2938c04b8 staging/lustre: Properly mark argument to p_ioctl in cfs_psdev_ops as __user
This also silents a sparse address space warning

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:32:36 -08:00
Oleg Drokin
e09bee346e staging/lustre: Properly mark obd_iocontrol argument as __user
Also update all methods and calls everywhere.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:29:30 -08:00
Oleg Drokin
44164fc992 staging/lustre: Get rid of an ugly statfs hack in lov_iocontrol
For some crazy reason ll_obd_statfs decided to decode async flag
passed from userspace and then pass it via a userspace pointer
argument to lov_iocontrol.
This patch moves flags decoding to lov_iocontrol where it belongs.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
4eb53dfd23 staging/lustre/lnet: Properly mark userspace pointer of lnet_ping()
This also happens to silence sparce warnings about different
address spaces.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
e3e8ff41c0 staging/lustre: Mark obd_ioctl_popdata/getdata argument as __user
arg is a userspace pointer and marking it as such makes sparse happy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
922cb32ca3 staging/lustre: Update user pointers in struct obd_ioctl_data
Make them void __user * instead of char * (or char __user *),
void * removes the necessity of explicit casts to proper type
where people also need to remember __user qualifiers, so I think
it works better here.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
33ab3abce7 staging/lustre: Change ioctl user pointers in libcfs_ioctl_data
Make them void __user * instead of char * (or char __user *),
void * removes the necessity of explicit casts to proper type
where people also need to remember __user qualifiers, so I think
it works better here.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
e2d52f7b3a staging/lustre: Add __user attributes to libcfs_ioctl_get/popdata args
Just make clear which pointers are from userspace and which are not in
libcfs_ioctl_getdata/libcfs_ioctl_popdata and their callers.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
John L. Hammond
f833ea10c7 staging/lustre/obdecho: remove userspace LSM handling
In lustre/obdecho/echo_client.c, remove handling of lov_stripe_md
passed from userspace (since userspace never passes it). Remove the
LOV specific code (ed_next_islov) from the echo client (since it
doesn't work).

Remove echo_get_stripe_off_id() and all calls to it since the stripe
count of the passed in lsm is always 0 and the funciton does nothing
in this case. Remove the then unused lsm parameters of
echo_client_page_debug_setup() and echo_client_page_debug_check().

In the OBD_IOC_GETATTR and OBD_IOC_SETATTR cases of
echo_client_iocontrol() do not set the oi_md member of struct obd_info
since only LOV OBD methods access it.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/12446
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
6973cd73af staging/lustre/obdecho: Remove unused ioctls
Remove long unused ECHO_IOC_GET_STRIPE, ECHO_IOC_SET_STRIPE,
ECHO_IOC_ENQUEUE and ECHO_IOC_CANCEL ioctls.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
ee11f9223e staging/lustre/lnet: Get rid of IOC_LIBCFS_PORTALS_COMPATIBILITY ioctl
This has been unused for ages and could be safely removed now.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
71c36dd795 staging/lustre/lnet: Get rid of IOC_LIBCFS_DEBUG_PEER hack
IOC_LIBCFS_DEBUG_PEER was added back in the stone ages to print debug
statistics on a peer when peer timeout happens.
Redo it properly as a separate LNet API call,
also get rid of "ioctl" forwarding into the underlying LNDs,
since no current LNDs implement this function anymore.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Oleg Drokin
fccfde7d5d staging/lustre/lnet: Make lnet_ping static
It's not used anywhere outside of api-ni.c anyway.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:27:25 -08:00
Julia Lawall
98aa766178 staging/lustre/llite: constify export_operations structures
This export_operations structure is never modified, so declare it as const.
Most other structures of this type are already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:22:53 -08:00
Julia Lawall
161106c5fa staging: lustre: obdecho: constify lu_device_operations and cl_device_operations structures
These lu_device_operations and cl_device_operations structures are never
modified, so declare them as const.  Other structures of these types are
already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:22:53 -08:00
Joshua Clayton
a4113d61e5 staging: lustre: fix lock imbalance
nrs_resource_put_safe() might hold a lock one one struct
while operating on the other.
There are 2 levels of structures.
Use nrs_policy_put(), which has locking baked in.

sparse gives the following warning:
drivers/staging/lustre//lustre/ptlrpc/nrs.c:498:39:
warning: context imbalance in 'nrs_resource_put_safe' -
  different lock contexts for basic block

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:22:53 -08:00
Valdis Kletnieks
ad0d779938 drivers/staging/lustre: Nuke another unsigned >= 0 assert
Clean up another case of the compiler remininding the programmer they
are an idiot:

drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c:308:34: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  LASSERT(page_pools.epp_waitqlen >= 0);

Just lose the assert, and save a page of compiler spew.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:21:27 -08:00
Valdis Kletnieks
bd6455de1a drivers/staging/lustre: Nuke an unsigned >= 0 assert
Writing asserts for almost-never-can-happen things can be valuable.
Writing an assert that tests that an "unsigned int" hasn't gone negative
isn't.

And it generates an *ugly* message:

drivers/staging/lustre/lustre/llite/rw.c:763:20: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
                    ^
include/linux/compiler.h:137:45: note: in definition of macro 'unlikely'
 #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                             ^
drivers/staging/lustre/lustre/llite/rw.c:763:2: note: in expansion of macro 'LASSERTF'
  LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
  ^
drivers/staging/lustre/lustre/llite/rw.c:763:20: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
                    ^
include/linux/compiler.h:137:53: note: in definition of macro 'unlikely'
 #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                     ^
drivers/staging/lustre/lustre/llite/rw.c:763:2: note: in expansion of macro 'LASSERTF'
  LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
  ^
drivers/staging/lustre/lustre/llite/rw.c:763:20: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
                    ^
include/linux/compiler.h:110:47: note: in definition of macro 'likely_notrace'
 #define likely_notrace(x) __builtin_expect(!!(x), 1)
                                               ^
include/linux/compiler.h:137:58: note: in expansion of macro '__branch_check__'
 #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                          ^
drivers/staging/lustre/lustre/llite/../include/linux/../../../include/linux/libcfs/libcfs_private.h:58:6: note: in expansion of macro 'unlikely'
  if (unlikely(!(cond))) {     \
      ^
drivers/staging/lustre/lustre/llite/rw.c:763:2: note: in expansion of macro 'LASSERTF'
  LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
  ^

Umm, thank you, GCC.  We'll delete the problem line so we never see that spew again.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:21:27 -08:00
Valdis Kletnieks
5aec2e0791 drivers/staging/lustre: Fix another C compiler whine: set but not used
CC [M]  drivers/staging/lustre/lustre/libcfs/module.o
drivers/staging/lustre/lustre/libcfs/module.c: In function 'lustre_insert_debugfs':
drivers/staging/lustre/lustre/libcfs/module.c:670:17: warning: variable 'entry' set but not used [-Wunused-but-set-variable]
  struct dentry *entry;
                     ^

Just ignore the dentry returned, and add a comment that we *know*
we're not really leaking the dentry because something else will be able
to reap it via recursion.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:21:27 -08:00
Valdis Kletnieks
7f6ab07293 drivers/staging/lustre: Clean up another C warnining: set but not used
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h: In function 'lustre_cfg_free':
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h:253:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
  int len;

Yep, we're just gonna call kfree, no need to calculate len. Bye-bye.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:21:27 -08:00
Valdis Kletnieks
f65a0922f0 drivers/staging/lustre: Fix set-but-unused whinge.
drivers/staging/lustre/lustre/fid/lproc_fid.c: In function 'ldebugfs_fid_write_common':
drivers/staging/lustre/lustre/fid/lproc_fid.c:67:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
  int rc;

We fix it by *using* the return code to help bulletproof it.  It says it's
test code - it should be *more* bulletproof than production, not less.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:21:27 -08:00
Valdis Kletnieks
b8947b399d drivers/staging/lustre: Silence warning about 'inline'
Low-hanging fruit first:

  CC [M]  drivers/staging/lustre/lustre/fid/fid_request.o
In file included from drivers/staging/lustre/lustre/fid/../include/lustre_net.h:66:0,
                 from drivers/staging/lustre/lustre/fid/../include/lustre_lib.h:64,
                 from drivers/staging/lustre/lustre/fid/../include/obd.h:52,
                 from drivers/staging/lustre/lustre/fid/fid_request.c:48:
drivers/staging/lustre/lustre/fid/../include/lu_object.h:765:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static const inline struct lu_device_operations *
 ^

So we just swap inline and const.  272 warnings gone. :)

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:21:27 -08:00
James Simmons
85de1f5516 staging: lustre: cleanup white space in kernel comm code
Cleanup the last white space issues in the kernel comm code.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:20:14 -08:00
James Simmons
a5f533f593 staging: lustre: fix all conditional comparison to zero for kernelcomm.c
Doing if (rc != 0) or if (rc == 0) is bad form. This patch corrects
kernelcomm.c to behavior according to kernel coding standards.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:20:14 -08:00
James Simmons
2bab480d1c staging: lustre: return proper error code for libcfs_kkuc_msg_put
The functon libcfs_kkuc_msg_put() returns -ENOSYS which is not
correct. Return -ENXIO instead if the kuc header is corrupt.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:20:14 -08:00