GitHub/moto-9609/android_kernel_motorola_exynos9610.git
6 years agostaging: rtlwifi: simplify logical operation
Arnd Bergmann [Wed, 23 Aug 2017 13:22:53 +0000 (15:22 +0200)]
staging: rtlwifi: simplify logical operation

gcc notices a very complicated way to check a value
for being equal to one, and warns about it:

drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c: In function 'halbtc8822b1ant_set_ext_ant_switch':
drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: error: '~' on a boolean expression [-Werror=bool-operation]
         ~switch_polatiry_inverse :
         ^
drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: note: did you mean to use logical not?
         ~switch_polatiry_inverse :
         ^

This simplifies this expression to make it more readable
and to make gcc happy.

Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: shut up -Wmaybe-uninitialized warning
Arnd Bergmann [Wed, 23 Aug 2017 13:22:51 +0000 (15:22 +0200)]
staging: rtlwifi: shut up -Wmaybe-uninitialized warning

This function contains a series of interdependent conditions,
slightly more than gcc can follow handle apparently:

drivers/staging/rtlwifi/base.c: In function 'rtl_check_beacon_key':
drivers/staging/rtlwifi/base.c:2546:34: error: 'ht_cap_ie' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This moves the code around a bit, to simplify the conditions
enough that gcc can see that all variables are correctly
initialized.

Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: comedi: comedi_fops: fix dev_err() warning style
Bryan Garza [Wed, 23 Aug 2017 22:37:00 +0000 (22:37 +0000)]
Staging: comedi: comedi_fops: fix dev_err() warning style

Changed dev_err() call to use function name constant instead of hardcoded
string. Issue found by checkpatch.

Signed-off-by: Bryan Garza <bry@riseup.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: save ciphertext for CTS IV
Gilad Ben-Yossef [Wed, 23 Aug 2017 09:12:05 +0000 (12:12 +0300)]
staging: ccree: save ciphertext for CTS IV

The crypto API requires saving the last blocks of ciphertext
in req->info for use as IV for CTS mode. The ccree driver
was not doing this. This patch fixes that.

The bug was manifested with cts(cbc(aes)) mode in tcrypt tests.

Fixes: 302ef8ebb4b2 ("Add CryptoCell skcipher support")
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: be consistent when checking strcmp() returns
Laurentiu Tudor [Wed, 23 Aug 2017 10:36:16 +0000 (13:36 +0300)]
staging: fsl-mc: be consistent when checking strcmp() returns

Throughout the driver we use == 0 / != 0 to check strcmp() returns except
this place, so fix it.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: cleanup paths for all LNet headers
James Simmons [Sun, 20 Aug 2017 02:26:58 +0000 (22:26 -0400)]
staging: lustre: lnet: cleanup paths for all LNet headers

Rationalize include paths in all the lnet header files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: libcfs: cleanup paths for libcfs headers
James Simmons [Sun, 20 Aug 2017 02:26:57 +0000 (22:26 -0400)]
staging: lustre: libcfs: cleanup paths for libcfs headers

Rationalize include paths in all the libcfs header files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: libcfs: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:56 +0000 (22:26 -0400)]
staging: lustre: libcfs: add include path to Makefile

Rationalize include paths in the libcfs source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: ksocklnd: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:55 +0000 (22:26 -0400)]
staging: lustre: ksocklnd: add include path to Makefile

Rationalize include paths in the ksocklnd source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: ko2iblnd: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:54 +0000 (22:26 -0400)]
staging: lustre: ko2iblnd: add include path to Makefile

Rationalize include paths in the ko2iblnd source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:53 +0000 (22:26 -0400)]
staging: lustre: lnet: add include path to Makefile

Rationalize include paths in the lnet core source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: selftest: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:52 +0000 (22:26 -0400)]
staging: lustre: lnet: selftest: add include path to Makefile

Rationalize include paths in the lnet selftest source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lustre: cleanup paths for lustre UAPI headers
James Simmons [Sun, 20 Aug 2017 02:26:51 +0000 (22:26 -0400)]
staging: lustre: lustre: cleanup paths for lustre UAPI headers

Rationalize include paths for the lustre uapi headers

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lustre: cleanup paths for lustre internal headers
James Simmons [Sun, 20 Aug 2017 02:26:50 +0000 (22:26 -0400)]
staging: lustre: lustre: cleanup paths for lustre internal headers

Rationalize include paths for the lustre internal headers

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: osc: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:49 +0000 (22:26 -0400)]
staging: lustre: osc: add include path to Makefile

Rationalize include paths in the osc source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdecho: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:48 +0000 (22:26 -0400)]
staging: lustre: obdecho: add include path to Makefile

Rationalize include paths in the obdecho source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdclass: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:47 +0000 (22:26 -0400)]
staging: lustre: obdclass: add include path to Makefile

Rationalize include paths in the obdclass source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: mgc: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:46 +0000 (22:26 -0400)]
staging: lustre: mgc: add include path to Makefile

Rationalize include paths in the mgc source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: mdc: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:45 +0000 (22:26 -0400)]
staging: lustre: mdc: add include path to Makefile

Rationalize include paths in the mdc source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lov: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:44 +0000 (22:26 -0400)]
staging: lustre: lov: add include path to Makefile

Rationalize include paths in the lov source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lmv: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:43 +0000 (22:26 -0400)]
staging: lustre: lmv: add include path to Makefile

Rationalize include paths in the lmv source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: llite: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:42 +0000 (22:26 -0400)]
staging: lustre: llite: add include path to Makefile

Rationalize include paths in the llite source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: ptlrpc: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:41 +0000 (22:26 -0400)]
staging: lustre: ptlrpc: add include path to Makefile

Rationalize include paths in the ptlrpc/ldlm source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fld: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:40 +0000 (22:26 -0400)]
staging: lustre: fld: add include path to Makefile

Rationalize include paths in the fld source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fid: add include path to Makefile
James Simmons [Sun, 20 Aug 2017 02:26:39 +0000 (22:26 -0400)]
staging: lustre: fid: add include path to Makefile

Start to rationalize include paths in the fid source code files.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove BIT macro from UAPI headers
James Simmons [Sun, 20 Aug 2017 02:26:38 +0000 (22:26 -0400)]
staging: lustre: uapi: remove BIT macro from UAPI headers

The BIT macro is not available for UAPI headers so remove
it from the lustre UAPI headers.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: use proper byteorder functions in lustre_idl.h
James Simmons [Sun, 20 Aug 2017 02:26:37 +0000 (22:26 -0400)]
staging: lustre: uapi: use proper byteorder functions in lustre_idl.h

In order for lustre_idl.h to be usable for both user
land and kernel space it has to use the proper
byteorder functions.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/16916
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove CONFIG_LUSTRE_OBD_MAX_IOCTL
James Simmons [Sun, 20 Aug 2017 02:26:36 +0000 (22:26 -0400)]
staging: lustre: uapi: remove CONFIG_LUSTRE_OBD_MAX_IOCTL

Now that lustre_ioctl.h is a UAPI header the kernel configuration
option CONFIG_LUSTRE_OBD_MAX_IOCTL needs to be remove. The user
land utilites will no longer be able to see this option and
actually they never used this option before. Since this is the
case setting the kernel configuration to something other than
8K could actually break things. The best option is just hard
code it to 8K.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/25246
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: migrate remaining uapi headers to uapi directory
James Simmons [Sun, 20 Aug 2017 02:26:35 +0000 (22:26 -0400)]
staging: lustre: uapi: migrate remaining uapi headers to uapi directory

Move all the remaining lustre headers shared between user land
and kernel space to the uapi directory.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/25246
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove libcfs.h from lustre_id.h/lustre_user.h
James Simmons [Sun, 20 Aug 2017 02:26:34 +0000 (22:26 -0400)]
staging: lustre: uapi: remove libcfs.h from lustre_id.h/lustre_user.h

These are the last UAPI headers that contain libcfs.h which is
internal kernel header. Since it is not available to user land
remove libcfs.h and add the need headers that libcfs.h provided.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: remove BIT macro from lnetctl.h
James Simmons [Sun, 20 Aug 2017 02:26:33 +0000 (22:26 -0400)]
staging: lustre: lnet: remove BIT macro from lnetctl.h

Now that lnetctl.h is a UAPI header the BIT macro has to be
removed.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: remove userland function prototype in lnetctl.h
James Simmons [Sun, 20 Aug 2017 02:26:32 +0000 (22:26 -0400)]
staging: lustre: lnet: remove userland function prototype in lnetctl.h

Several function prototypes of the form jt_ptl_* are only needed
by userland so they can be removed.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: libcfs: sort headers in libcfs.h
James Simmons [Sun, 20 Aug 2017 02:26:31 +0000 (22:26 -0400)]
staging: lustre: libcfs: sort headers in libcfs.h

Move all the included headers in libcfs.h to the top of the
file.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: migrate headers to lnet uapi directory
James Simmons [Sun, 20 Aug 2017 02:26:30 +0000 (22:26 -0400)]
staging: lustre: lnet: migrate headers to lnet uapi directory

Migrate the headers used by user land and kernel space to the
libcfs/lnet uapi directory.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: delete lnet.h
James Simmons [Sun, 20 Aug 2017 02:26:29 +0000 (22:26 -0400)]
staging: lustre: lnet: delete lnet.h

The header lnet.h is just a bunch of headers included in
a header. Just delete it and include the appropriate
headers where needed.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: socklnd: create socklnd.h UAPI header
James Simmons [Sun, 20 Aug 2017 02:26:28 +0000 (22:26 -0400)]
staging: lustre: socklnd: create socklnd.h UAPI header

Break out the parts from libcfs_debug.h that is used by both user
land and kernel space into a new UAPI header.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: libcfs: create libcfs_debug.h UAPI header
James Simmons [Sun, 20 Aug 2017 02:26:27 +0000 (22:26 -0400)]
staging: lustre: libcfs: create libcfs_debug.h UAPI header

Break out the parts from libcfs_debug.h that is used by both user
land and kernel space into a new UAPI header.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: libcfs: remove LOGL and LOGU macros
James Simmons [Sun, 20 Aug 2017 02:26:26 +0000 (22:26 -0400)]
staging: lustre: libcfs: remove LOGL and LOGU macros

The macro LOGU is not used anymore and LOGL is used in
one place. No reason to keep LOGL around anymore.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: libcfs: remove htonl hack in libcfs.h
James Simmons [Sun, 20 Aug 2017 02:26:25 +0000 (22:26 -0400)]
staging: lustre: libcfs: remove htonl hack in libcfs.h

This is really old hack for earlier gcc version that
had a hard time compiling byteorder.h. Lets remove it.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: label lustre_cfg.h as an uapi header
James Simmons [Sun, 20 Aug 2017 02:26:24 +0000 (22:26 -0400)]
staging: lustre: uapi: label lustre_cfg.h as an uapi header

Change LUSTRE_CFG_H to _UAPI_LUSTRE_CFG_H_ now that it is
a proper UAPI header.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: style cleanup of lustre_cfg.h
James Simmons [Sun, 20 Aug 2017 02:26:23 +0000 (22:26 -0400)]
staging: lustre: uapi: style cleanup of lustre_cfg.h

Some style and white space cleanups to make lustre_cfg.h
easy to read.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: check if argument for lustre_cfg_buf() is NULL
James Simmons [Sun, 20 Aug 2017 02:26:22 +0000 (22:26 -0400)]
staging: lustre: uapi: check if argument for lustre_cfg_buf() is NULL

Check if lcfg passed in is NULL and if it is just return NULL.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: change variable type to match
James Simmons [Sun, 20 Aug 2017 02:26:21 +0000 (22:26 -0400)]
staging: lustre: uapi: change variable type to match

Change i from int to __u32 to match lcfg_bufcount field. Also
this matches what the other functions also do.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove need for libcfs.h from lustre_cfg.h
James Simmons [Sun, 20 Aug 2017 02:26:20 +0000 (22:26 -0400)]
staging: lustre: uapi: remove need for libcfs.h from lustre_cfg.h

Several libcfs.h macros are present in lustre_cfg.h, but libcfs.h
is not available so lets replace those macros with real code.
The header libcfs.h also provides errno.h so with libcfs.h gone
include errno.h directly.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move lustre_cfg.h to uapi directory
James Simmons [Sun, 20 Aug 2017 02:26:19 +0000 (22:26 -0400)]
staging: lustre: uapi: move lustre_cfg.h to uapi directory

Move lustre_cfg.h to its proper place. Adjust additonal headers
included in lustre_cfg.h.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdclass: no need to check for kfree
James Simmons [Sun, 20 Aug 2017 02:26:18 +0000 (22:26 -0400)]
staging: lustre: obdclass: no need to check for kfree

In class_config_llog_handler() a flag, inst, was used to
determine if it was safe to call kfree. Its not needed so
remove the flag.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move lustre_cfg_string() to obd_config.c
James Simmons [Sun, 20 Aug 2017 02:26:17 +0000 (22:26 -0400)]
staging: lustre: uapi: move lustre_cfg_string() to obd_config.c

To perserve the truncate warning move lustre_cfg_string()
to obd_config.c. A identical function was created for
userland. This function was a bit big for a inline function.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: don't memory allocate in UAPI header
James Simmons [Sun, 20 Aug 2017 02:26:16 +0000 (22:26 -0400)]
staging: lustre: uapi: don't memory allocate in UAPI header

The inline function lustre_cfg_new() calls kzalloc() but
this is a UAPI header. Remove kzalloc() and rename the
function to lustre_cfg_init(). The lustre kernel code
that was calling lustre_cfg_new() can doing the memory
allocation and pass the new buffer to lustre_cfg_init()
to fill in.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove lustre_cfg_free wrapper
James Simmons [Sun, 20 Aug 2017 02:26:15 +0000 (22:26 -0400)]
staging: lustre: uapi: remove lustre_cfg_free wrapper

Replace all lustre_cfg_free() calls with direct kfree()
call.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: style cleanups for lustre_param.h
James Simmons [Sun, 20 Aug 2017 02:26:14 +0000 (22:26 -0400)]
staging: lustre: uapi: style cleanups for lustre_param.h

Remove the white space in the lustre_param.h header and
align the code so its easier to read.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: label lustre_param.h as an uapi header
James Simmons [Sun, 20 Aug 2017 02:26:13 +0000 (22:26 -0400)]
staging: lustre: uapi: label lustre_param.h as an uapi header

Change LUSTRE_PARAM_H_ to _UAPI_LUSTRE_PARAM_H_ now that is
a proper UAPI header

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move lustre_param.h to uapi directory
James Simmons [Sun, 20 Aug 2017 02:26:12 +0000 (22:26 -0400)]
staging: lustre: uapi: move lustre_param.h to uapi directory

Move the header lustre_param.h to proper uapi directory.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove included headers out of lustre_param.h
James Simmons [Sun, 20 Aug 2017 02:26:11 +0000 (22:26 -0400)]
staging: lustre: uapi: remove included headers out of lustre_param.h

All the included headers in lustre_param.h are lustre kernel
internal headers and they are not even needed. Just remove them.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move kernel only prototypes out of lustre_param.h
James Simmons [Sun, 20 Aug 2017 02:26:10 +0000 (22:26 -0400)]
staging: lustre: uapi: move kernel only prototypes out of lustre_param.h

Move all the kernel specific function prototypes from
lustre_param.h into obd_config.h which is a kernel only
header.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: label lustre_ioctl.h as a UAPI header
James Simmons [Sun, 20 Aug 2017 02:26:09 +0000 (22:26 -0400)]
staging: lustre: uapi: label lustre_ioctl.h as a UAPI header

Change LUSTRE_IOCTL_H_ to _UAPI_LUSTRE_IOCTL_H_ now that is
a proper UAPI header

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: cleanup headers for lustre_ioctl.h
James Simmons [Sun, 20 Aug 2017 02:26:08 +0000 (22:26 -0400)]
staging: lustre: uapi: cleanup headers for lustre_ioctl.h

With the cleanups we no longer need to drag in tons of
user land headers. Lets simplify the include headers.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: use __ALIGN_KERNEL for lustre_ioctl.h
James Simmons [Sun, 20 Aug 2017 02:26:07 +0000 (22:26 -0400)]
staging: lustre: uapi: use __ALIGN_KERNEL for lustre_ioctl.h

Replace cfs_size_round() standard __ALIGN_KERNEL macro. This
removes the dependency of libcfs.h which is a kernel only
header.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move lustre_ioctl.h to uapi directory
James Simmons [Sun, 20 Aug 2017 02:26:06 +0000 (22:26 -0400)]
staging: lustre: uapi: move lustre_ioctl.h to uapi directory

Move the header lustre_ioctl.h to proper uapi directory.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move obd_ioctl_is_invalid() to linux-module.c
James Simmons [Sun, 20 Aug 2017 02:26:05 +0000 (22:26 -0400)]
staging: lustre: uapi: move obd_ioctl_is_invalid() to linux-module.c

The inline function obd_ioctl_is_invalid() is no longer needed by
userland and also the function was pretty bug for a inline function.
Since this is the case we can move this kernel only code to the
linux-module.c which is the only place it is used.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move obd_ioctl_getdata() declaration
James Simmons [Sun, 20 Aug 2017 02:26:04 +0000 (22:26 -0400)]
staging: lustre: uapi: move obd_ioctl_getdata() declaration

Move obd_ioctl_getdata() from lustre_ioctl.h to obd_class.h
since this function is only used by kernel space.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove obd_ioctl_popdata() wrapper
James Simmons [Sun, 20 Aug 2017 02:26:03 +0000 (22:26 -0400)]
staging: lustre: uapi: remove obd_ioctl_popdata() wrapper

Replace obd_ioctl_popdata() with direct copy_to_user() call.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove obd_ioctl_freedata() wrapper
James Simmons [Sun, 20 Aug 2017 02:26:02 +0000 (22:26 -0400)]
staging: lustre: uapi: remove obd_ioctl_freedata() wrapper

Replace obd_ioctl_freedata() with direct kvfree() call.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove userland version of obd_ioctl_*()
James Simmons [Sun, 20 Aug 2017 02:26:01 +0000 (22:26 -0400)]
staging: lustre: uapi: remove userland version of obd_ioctl_*()

The header lustre_ioctl.h has both kernel and user space versions
of obd_ioctl_*() functions. Lets remove the user land version
which have been integrated into the lustre tools.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove unused function in lustre_disk.h
James Simmons [Sun, 20 Aug 2017 02:26:00 +0000 (22:26 -0400)]
staging: lustre: uapi: remove unused function in lustre_disk.h

Delete code that is used by only the server or just in user
land. Now this file is a normal kernel header. The UAPI
version of this header is only needed for server side so
no need to create a new header in uapi directory.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/25194
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: move lu_fid, ost_id funcs out of lustre_idl.h
Ben Evans [Sun, 20 Aug 2017 02:25:59 +0000 (22:25 -0400)]
staging: lustre: uapi: move lu_fid, ost_id funcs out of lustre_idl.h

Move lu_fid functions into lustre/lustre_fid.h
Move ost_id functions into lustre/lustre_ostid.h
Fix indenting, include new headers as needed.

Several inline functions in the header lustre_ostid.h
are using debug macros instead of returning proper errors.
Remove the debug macros and properly handle the returned
error codes. Place both UAPI headers lustre_fid.h and
lustre_ostid.h into the uapi directory.

Signed-off-by: Ben Evans <bevans@cray.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/22712
Reviewed-on: https://review.whamcloud.com/24569
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: update URL doc link in lustre_fid.h
Ben Evans [Sun, 20 Aug 2017 02:25:58 +0000 (22:25 -0400)]
staging: lustre: uapi: update URL doc link in lustre_fid.h

The wiki has been revived so update the URL about the FID
design in lustre_fid.h.

Signed-off-by: Ben Evans <bevans@cray.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/22712
Reviewed-on: https://review.whamcloud.com/24569
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: return error code for ostid_set_id
Ben Evans [Sun, 20 Aug 2017 02:25:57 +0000 (22:25 -0400)]
staging: lustre: uapi: return error code for ostid_set_id

Currently the function ostid_set_id() just logs an error
and just keeps going. This function is also used by user
land tools so having special lustre kernel debugging
code is not desired. So instead just return an error
code and have the calling kernel code print the error
instead.

Signed-off-by: Ben Evans <bevans@cray.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/22712
Reviewed-on: https://review.whamcloud.com/24569
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: remove unused functions for lustre_fid.h
James Simmons [Sun, 20 Aug 2017 02:25:56 +0000 (22:25 -0400)]
staging: lustre: uapi: remove unused functions for lustre_fid.h

The inline function fid_is_namespace_visible and ost_fid_from_resid
are only used for server code so we can remove it.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: uapi: Move functions out of lustre_idl.h
Ben Evans [Sun, 20 Aug 2017 02:25:55 +0000 (22:25 -0400)]
staging: lustre: uapi: Move functions out of lustre_idl.h

Migrate functions set/get_mrc_cr_flags, ldlm_res_eq
ldlm_extent_overlap, ldlm_extent_contain,
ldlm_request_bufsize, and all the PTLRPC dump_*
functions out of lustre_idl.h which is a UAPI header
to the places in the kernel code they are actually used.
Delete unused lmv_mds_md_stripe_count and
agent_req_in_final_state.

Signed-off-by: Ben Evans <bevans@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: http://review.whamcloud.com/21484
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: r8822be: fix a couple of spelling mistakes
Colin Ian King [Tue, 22 Aug 2017 12:51:08 +0000 (13:51 +0100)]
staging: r8822be: fix a couple of spelling mistakes

Trivial fixes to spelling mistake in pr_err error messages:

errorr -> error
mismactch -> mismatch

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: typec: tcpm: make function tcpm_get_pwr_opmode
Colin Ian King [Tue, 22 Aug 2017 16:02:18 +0000 (17:02 +0100)]
staging: typec: tcpm: make function tcpm_get_pwr_opmode

The function pointer tcpm_get_pwr_opmode is local to the source and does
not need to be in global scope, so make it static.

Cleans up sparse warning:
symbol 'tcpm_get_pwr_opmode' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: fsl-dpaa2: ethernet: dpni.c: Fixed alignment to match open parenthesis.
Srishti Sharma [Sun, 20 Aug 2017 01:44:55 +0000 (07:14 +0530)]
Staging: fsl-dpaa2: ethernet: dpni.c: Fixed alignment to match open parenthesis.

Fixed alignment so that it matched open parenthesis

Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: audio: constify snd_soc_dai_ops structures
Arvind Yadav [Mon, 21 Aug 2017 04:58:24 +0000 (10:28 +0530)]
staging: greybus: audio: constify snd_soc_dai_ops structures

snd_soc_dai_ops are not supposed to change at runtime. All functions
working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with
const snd_soc_dai_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: greybus: Fix spelling error in comment
Eames Trinh [Mon, 21 Aug 2017 22:11:37 +0000 (00:11 +0200)]
Staging: greybus: Fix spelling error in comment

Fixed a spelling error.

Signed-off-by: Eames Trinh <eamestrinh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: fix multiple build errors
Randy Dunlap [Tue, 22 Aug 2017 15:51:09 +0000 (08:51 -0700)]
staging: rtlwifi: fix multiple build errors

Fix many build errors when NETDEVICES is not enabled.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: use ATTRIBUTE_GROUPS instead of creating our own
David Kershner [Tue, 22 Aug 2017 17:27:36 +0000 (13:27 -0400)]
staging: unisys: use ATTRIBUTE_GROUPS instead of creating our own

Greg noticed that we were creating our own attribute groups, instead of
using the ATTRIBUTE_GROUPS macro, this patch fixes our mistake.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Get rid of passthrough function visorchipset_device_destroy
Sameer Wadgaonkar [Tue, 22 Aug 2017 17:27:35 +0000 (13:27 -0400)]
staging: unisys: visorbus: Get rid of passthrough function visorchipset_device_destroy

The function visorchipset_device_destroy just called remove_visor_device,
we can just combine it with remove_visor_device.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Get rid of passthrough function visorchipset_device_create
Sameer Wadgaonkar [Tue, 22 Aug 2017 17:27:34 +0000 (13:27 -0400)]
staging: unisys: visorbus: Get rid of passthrough function visorchipset_device_create

The function visorchipset_device_create just called create_visor_device,
we can just combine it with create_visor_device.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_destroy
Sameer Wadgaonkar [Tue, 22 Aug 2017 17:27:33 +0000 (13:27 -0400)]
staging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_destroy

The function visorchipset_bus_destroy just called viosrbus_remove_instance,
we can just combine it with visorbus_remove_instance.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: iochannel.h: Add proper copyright statement
David Binder [Tue, 22 Aug 2017 17:27:32 +0000 (13:27 -0400)]
staging: unisys: include: iochannel.h: Add proper copyright statement

Adds the proper Unisys copyright statement to the top of iochannel.h.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: ultrainputreport.h: Adjust comment formatting
David Binder [Tue, 22 Aug 2017 17:27:31 +0000 (13:27 -0400)]
staging: unisys: visorinput: ultrainputreport.h: Adjust comment formatting

The first line of the top file comment should begin on the line following
the block comment opening, thereby following the convention used elsewhere
in the driver set.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorhba: Adjust top comment formatting
David Binder [Tue, 22 Aug 2017 17:27:30 +0000 (13:27 -0400)]
staging: unisys: visorhba: Adjust top comment formatting

The first line of the top file comment should begin on the line following
the block comment opening, thereby following the convention used elsewhere
in the driver set.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: visorbus.h: Remove filename in top comment
David Binder [Tue, 22 Aug 2017 17:27:29 +0000 (13:27 -0400)]
staging: unisys: include: visorbus.h: Remove filename in top comment

Removes unnecessary filename in the top file comment.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: visorinput.c: Remove filename in top comment
David Binder [Tue, 22 Aug 2017 17:27:28 +0000 (13:27 -0400)]
staging: unisys: visorinput: visorinput.c: Remove filename in top comment

Removes unnecessary filename in the top file comment.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorchannel.c: Remove filename in top comment
David Binder [Tue, 22 Aug 2017 17:27:27 +0000 (13:27 -0400)]
staging: unisys: visorbus: visorchannel.c: Remove filename in top comment

Removes unnecessary filename in the top file comment.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorbus_main.c: Remove filename in top comment
David Binder [Tue, 22 Aug 2017 17:27:26 +0000 (13:27 -0400)]
staging: unisys: visorbus: visorbus_main.c: Remove filename in top comment

Removes unnecessary filename in the top file comment.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorchipset.c: Fix SonarQube sprintf findings
David Binder [Tue, 22 Aug 2017 17:27:25 +0000 (13:27 -0400)]
staging: unisys: visorbus: visorchipset.c: Fix SonarQube sprintf findings

Fixes two sprintf invocations where we attempt to format an unsigned
integer as a signed integer.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: iochannel.h: Update comments for #defines
David Kershner [Tue, 22 Aug 2017 17:27:07 +0000 (13:27 -0400)]
staging: unisys: include: iochannel.h: Update comments for #defines

Cleaned up some #defines to make the beginning of the file read easier.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_create
David Kershner [Tue, 22 Aug 2017 17:27:24 +0000 (13:27 -0400)]
staging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_create

The function visorchipset_bus_create just called visorbus_create_instance,
we should just combine it with visorbus_create_instance.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: reference bus_no and dev_no directly
David Kershner [Tue, 22 Aug 2017 17:27:23 +0000 (13:27 -0400)]
staging: unisys: reference bus_no and dev_no directly

Don't store it in a local variable but reference it from the
visor_device.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: don't copy to local variable
David Kershner [Tue, 22 Aug 2017 17:27:22 +0000 (13:27 -0400)]
staging: unisys: don't copy to local variable

Do the check with the values in the structure instead of copying them to
local variables.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Remove confusing comment in controlvmchannel.
David Kershner [Tue, 22 Aug 2017 17:27:21 +0000 (13:27 -0400)]
staging: unisys: visorbus: Remove confusing comment in controlvmchannel.

Referencing a SegmentIndex doesn't make sense in the Linux drivers, get rid
of the comment.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: Move SIOVM guid to visorbus
David Kershner [Tue, 22 Aug 2017 17:27:20 +0000 (13:27 -0400)]
staging: unisys: Move SIOVM guid to visorbus

The SIOVM guid is only used by visorchipset. So define it there instead
of a global header file.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: Move VNIC GUID to visornic
David Kershner [Tue, 22 Aug 2017 17:27:19 +0000 (13:27 -0400)]
staging: unisys: Move VNIC GUID to visornic

Instead of including it in the global channel.h, move the VNIC GUID to the
visornic module.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: remove unnecessary blank line from channel.h
David Kershner [Tue, 22 Aug 2017 17:27:18 +0000 (13:27 -0400)]
staging: unisys: include: remove unnecessary blank line from channel.h

Remove unnecessary blank line from channel.h #defines.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: Get rid of unused includes
David Kershner [Tue, 22 Aug 2017 17:27:17 +0000 (13:27 -0400)]
staging: unisys: visorinput: Get rid of unused includes

Cleanups caused us to not need to include a bunch of headers, got rid of
them.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: iochannel needs to include skbuff
David Kershner [Tue, 22 Aug 2017 17:27:16 +0000 (13:27 -0400)]
staging: unisys: include: iochannel needs to include skbuff

The iochannel.h header file references ETH_HLEN which is defined in
skbuff. Removed it from visorhba since it was no longer needed.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Remove unnecessary includes for visorchipset.c
David Kershner [Tue, 22 Aug 2017 17:27:15 +0000 (13:27 -0400)]
staging: unisys: visorbus: Remove unnecessary includes for visorchipset.c

Visorchipset.c was including unnecessary include files, either included by
other headers or not needed at all.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: fix include dependency
David Kershner [Tue, 22 Aug 2017 17:27:14 +0000 (13:27 -0400)]
staging: unisys: visorbus: fix include dependency

Due to include order, the visorbus_private.h file was missing a required
include header visorbus.h. If visorchipset.c or visorbus_main.c ever were
to change the order of the includes for visobus.h and visorbus_private.h,
the code would fail to compile.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: Remove unneeded includes from visorbus.h
David Kershner [Tue, 22 Aug 2017 17:27:13 +0000 (13:27 -0400)]
staging: unisys: include: Remove unneeded includes from visorbus.h

A bunch of code churn has caused the following include files to not be
needed by visorbus.h:

linux/poll.h
linux/kernel.h
linux/uuid.h
linux/seq_file.h

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>