GitHub/LineageOS/android_kernel_motorola_exynos9610.git
9 years agostaging/lustre/obdclass: Drop unused code from obdo.c
Oleg Drokin [Tue, 29 Sep 2015 03:43:58 +0000 (23:43 -0400)]
staging/lustre/obdclass: Drop unused code from obdo.c

These functions are not even referenced in any header files anymore.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused function server_name2svname()
Oleg Drokin [Tue, 29 Sep 2015 03:43:57 +0000 (23:43 -0400)]
staging/lustre: Remove unused function server_name2svname()

All users are only in the server code

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused function class_handle_hash_back()
Oleg Drokin [Tue, 29 Sep 2015 03:43:56 +0000 (23:43 -0400)]
staging/lustre: Remove unused function class_handle_hash_back()

No callers left.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obdclass: Remove unused functions from genops.c
Oleg Drokin [Tue, 29 Sep 2015 03:43:55 +0000 (23:43 -0400)]
staging/lustre/obdclass: Remove unused functions from genops.c

These functions are mostly used on the server.

class_uuid2obd, get_devices_count, class_obd_list, class_conn2obd,
class_conn2cliimp, class_connected_export, obd_exports_barrier,
kuc_* (kernel-userspace communications).

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ldlm: Remove unused round_timeout function
Oleg Drokin [Tue, 29 Sep 2015 03:43:54 +0000 (23:43 -0400)]
staging/lustre/ldlm: Remove unused round_timeout function

It's not referenced anywhere anymore.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused lu_object functions.
Oleg Drokin [Tue, 29 Sep 2015 03:43:53 +0000 (23:43 -0400)]
staging/lustre: Remove unused lu_object functions.

Quite a bunch of them are only used on the server.
lu_object_put_nocache, lu_object_invariant, lu_dev_del_linkage,
lu_context_tags_update, lu_context_tags_clear, lu_session_tags_update,
lu_session_tags_clear, lu_env_refill_by_tags, lu_printk_printer,
lu_object_assign_fid, lu_object_anon, lu_buf_free, lu_buf_alloc,
lu_buf_realloc, lu_buf_check_and_alloc, lu_buf_check_and_grow

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused functions and definitions from cl_object
Oleg Drokin [Tue, 29 Sep 2015 03:43:52 +0000 (23:43 -0400)]
staging/lustre: Remove unused functions and definitions from cl_object

cl_object_header_fini, cl_object_has_locks, cl_attr2lvb,
cl_page_list_own, cl_page_list_unmap, cl_2queue_assume,
cl_io_print, cl_enqueue,
also cleanup extern declarations in cl_object.h

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused ptlrpcd_add_rqset()
Oleg Drokin [Tue, 29 Sep 2015 03:43:51 +0000 (23:43 -0400)]
staging/lustre: Remove unused ptlrpcd_add_rqset()

No point in retaining it if it's unused.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused statfs_pack()
Oleg Drokin [Tue, 29 Sep 2015 03:43:50 +0000 (23:43 -0400)]
staging/lustre: Remove unused statfs_pack()

It's only used on the server.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove high-priority request callbacks
Oleg Drokin [Tue, 29 Sep 2015 03:43:49 +0000 (23:43 -0400)]
staging/lustre: Remove high-priority request callbacks

This function is only used on the server where real high-priority
requests actually exist.
This deletes ptlrpc_hpreq_handler() and ptlrpc_request_change_export()

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused reply state batches code
Oleg Drokin [Tue, 29 Sep 2015 03:43:48 +0000 (23:43 -0400)]
staging/lustre: Remove unused reply state batches code

rs_batch is used on the server only.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused req_capsule_server_grow
Oleg Drokin [Tue, 29 Sep 2015 03:43:47 +0000 (23:43 -0400)]
staging/lustre: Remove unused req_capsule_server_grow

It's only used on the server

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ptlrpc: Remove server-specific health checks
Oleg Drokin [Tue, 29 Sep 2015 03:43:46 +0000 (23:43 -0400)]
staging/lustre/ptlrpc: Remove server-specific health checks

ptlrpc_service_health_check is only used on a service, so
it makes no point to retain it in the client code.
Also removing it's helpers: ptlrpc_svcpt_health_check and
ptlrpc_nrs_req_peek_nolock

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused lustre_acl_xattr_merge2posix()
Oleg Drokin [Tue, 29 Sep 2015 03:43:45 +0000 (23:43 -0400)]
staging/lustre: Remove unused lustre_acl_xattr_merge2posix()

Apparently this is only used only on the metadata server.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused target_print_req()
Oleg Drokin [Tue, 29 Sep 2015 03:43:44 +0000 (23:43 -0400)]
staging/lustre: Remove unused target_print_req()

This is a server-side request printing function, so we don't
really need it on the client.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: Use module_i2c_driver
Shraddha Barke [Tue, 29 Sep 2015 05:44:42 +0000 (11:14 +0530)]
Staging: most: Use module_i2c_driver

Macro module_i2c_driver is used for drivers whose init
and exit paths does only register and unregister to i2c
API. Remove some boilerplate code by using module_i2c_driver.

Problem found using Coccinelle.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_tiocmd: remove unused code
Luis de Bethencourt [Tue, 29 Sep 2015 11:22:03 +0000 (12:22 +0100)]
staging: comedi: ni_tiocmd: remove unused code

Code after a return will never run, removing this dead code.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove dead code
Mike Rapoport [Tue, 29 Sep 2015 07:47:49 +0000 (10:47 +0300)]
staging: sm750fb: remove dead code

Remove the code enclosed in '#if 0'

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove dead code
Luis de Bethencourt [Mon, 28 Sep 2015 21:52:33 +0000 (22:52 +0100)]
staging: rtl8712: remove dead code

The while() loop will only exit in a return or a goto ask_for_joinbss,
which means it will never break and execute the return after it.
Removing return _FAIL since it is dead code.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl819u: Fix brace styling issues
mike dupuis [Thu, 24 Sep 2015 06:15:48 +0000 (22:15 -0800)]
Staging: rtl819u: Fix brace styling issues

This is a patch to correct two flavors of brace styling issues in
ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: spaces required around = operator
mike dupuis [Thu, 24 Sep 2015 06:15:43 +0000 (22:15 -0800)]
Staging: rtl8192u: spaces required around = operator

This is a patch to add spaces around = operators in several instances
in ieee80211_softmac_wx.c

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: add spaces around == and || operators
mike dupuis [Thu, 24 Sep 2015 06:15:38 +0000 (22:15 -0800)]
Staging: rtl8192u: add spaces around == and || operators

This is a patch to add missing spaces around == and || operators in one
instance in ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: move open braces to previous lines
mike dupuis [Thu, 24 Sep 2015 06:15:34 +0000 (22:15 -0800)]
Staging: rtl8192u: move open braces to previous lines

This is a patch to move opening braces to the lines on which their
corresponding if-statements exist in ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: add missing blank lines after declarations
mike dupuis [Thu, 24 Sep 2015 06:15:29 +0000 (22:15 -0800)]
Staging: rtl8192u: add missing blank lines after declarations

This is a patch to add blank lines after declaration ins several
instances in iee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: space required after ','
mike dupuis [Thu, 24 Sep 2015 06:15:24 +0000 (22:15 -0800)]
Staging: rtl8192u: space required after ','

This is a fix to add spaces after commas in ieee80211_softmac_wx.c.

Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix resource leak
Mateusz Kulikowski [Sun, 27 Sep 2015 19:48:19 +0000 (21:48 +0200)]
staging: rtl8723au: Fix resource leak

Firmware was not released properly if kmemdup fails.

Addresses-Coverity-Id: 1269118
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Fix build error when CFG80211 is not selected
Jakub Sitnicki [Wed, 23 Sep 2015 21:42:26 +0000 (23:42 +0200)]
staging: rtl8188eu: Fix build error when CFG80211 is not selected

The kbuild test robot reports the following build error for
i386-randconfig-c0-09230740:

>> ERROR: "ieee80211_hdrlen" [drivers/staging/rtl8188eu/r8188eu.ko] undefined!

Add a dependency on CFG80211 to fix it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: issue_action_BA(): extract ADDBA_req pointer
Luca Ceresoli [Tue, 22 Sep 2015 21:50:38 +0000 (23:50 +0200)]
staging: rtl8188eu: issue_action_BA(): extract ADDBA_req pointer

pmlmeinfo->ADDBA_req is accessed three times in this function, but it
contributes to generating lines above 80 characters that are not easy to
split in a nice way.

Extract a pointer to it to make code slightly more concise and fix some
lines over 80 characters.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: don't cast when calling rtw_set_fixed_ie()
Luca Ceresoli [Tue, 22 Sep 2015 21:50:37 +0000 (23:50 +0200)]
staging: rtl8188eu: don't cast when calling rtw_set_fixed_ie()

The 'pbuf' and 'source' arguments to rtw_set_fixed_ie() are (void *), the
explicit typecasts are not needed. They just make code less readable.

Also fix checkpatch issues in the lines touched:
  ERROR: space prohibited before that ',' (ctx:WxW)
  WARNING: line over 80 characters
  CHECK: Unnecessary parentheses around <var>

Note: some of the modified lines are still over 80 characters because they
are not fixable by just adding newlines. They will be fixed in a later
patch.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: rtw_set_fixed_ie(): accept void* parameters
Luca Ceresoli [Tue, 22 Sep 2015 21:50:36 +0000 (23:50 +0200)]
staging: rtl8188eu: rtw_set_fixed_ie(): accept void* parameters

rtw_set_ie() is a memcpy-like function, taking addresses of memory buffers
among its parameters. Similarly to memcpy, change the parameters to be
void*. This will allow to get rid of typecasts whenever it is called.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove useless comment
Luca Ceresoli [Tue, 22 Sep 2015 21:50:35 +0000 (23:50 +0200)]
staging: rtl8188eu: remove useless comment

This comment gives pretty much the same information as the name of the
function that it immediately precedes.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Merge/Remove _rtl92e_dm_bb_initialgain_backup
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:33 +0000 (21:04 +0200)]
staging: rtl8192e: Merge/Remove _rtl92e_dm_bb_initialgain_backup

Merge rtl92e_dm_backup_state and _rtl92e_dm_bb_initialgain_backup.
Static function is called only once and dm_backup_state had short body.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Simplify _rtl92e_calculate_bit_shift
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:32 +0000 (21:04 +0200)]
staging: rtl8192e: Simplify _rtl92e_calculate_bit_shift

Use ffs instead of iteration. Behaviour of function doesn't change.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove extra braces
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:31 +0000 (21:04 +0200)]
staging: rtl8192e: Remove extra braces

Remove extra braces in _rtl92e_dm_check_tx_power_tracking_thermal.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove _rtl92e_dm_check_pbc_gpio
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:30 +0000 (21:04 +0200)]
staging: rtl8192e: Remove _rtl92e_dm_check_pbc_gpio

Function is empty.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove _rtl92e_silent_reset_mesh
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:29 +0000 (21:04 +0200)]
staging: rtl8192e: Remove _rtl92e_silent_reset_mesh

Function is empty.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:28 +0000 (21:04 +0200)]
staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings

Remove FSF address from licenses at the beginning of files.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix CONSTANT_COMPARISON warnings
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:27 +0000 (21:04 +0200)]
staging: rtl8192e: Fix CONSTANT_COMPARISON warnings

Remove yoda conditions where pointed by checkpatch.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix SUSPECT_CODE_INDENT warnings
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:26 +0000 (21:04 +0200)]
staging: rtl8192e: Fix SUSPECT_CODE_INDENT warnings

Fix SUSPECT_CODE_INDENT warnings (indentation).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rtl_wx: Fix BRACES warning
Mateusz Kulikowski [Sun, 20 Sep 2015 19:04:25 +0000 (21:04 +0200)]
staging: rtl8192e: rtl_wx: Fix BRACES warning

Fix checkpatch BRACES warning.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: Fixed uintX_t CHECK checkpatch warnings
J. German Rivera [Fri, 25 Sep 2015 16:21:01 +0000 (11:21 -0500)]
staging: fsl-mc: Fixed uintX_t CHECK checkpatch warnings

Replaced all uses of uintX_t types to uX types, to be
checkpatch clean.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: Moved kernel-doc comments to .c files
J. German Rivera [Thu, 24 Sep 2015 19:26:54 +0000 (14:26 -0500)]
staging: fsl-mc: Moved kernel-doc comments to .c files

Moved kernel-doc comments for non-inline functions
from header files to .c files.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: up-rev dprc binary interface to v4.0
J. German Rivera [Wed, 23 Sep 2015 21:11:03 +0000 (16:11 -0500)]
staging: fsl-mc: up-rev dprc binary interface to v4.0

Add cmd_flags parameter to all dprc APIs to comply
with the dprc 4.0 MC interface. Updated MC version
major number.  Pass irq args in struct instead of
separate args.

dprc 4.0 uses MC-relative offsets to specify object regions,
instead of physical addresses. So, translate_mc_addr() and
struct fsl_mc_addr_translation_range need to be updated
accordingly.

Update commands for 4.0: add new commands 'set/get
obj irq', 'set obj label', 'get obj descriptor'.
Remove 'get portal paddr'.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: up-rev dpcon binary interface to v2.0
J. German Rivera [Wed, 23 Sep 2015 21:11:02 +0000 (16:11 -0500)]
staging: fsl-mc: up-rev dpcon binary interface to v2.0

dpcon object minor version number updated to match latest
MC firmware. This change is needed because the dpcon
object binds to the allocator and the current driver match
logic uses object version numbers.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: up-rev dpmcp binary interface to v2.0
J. German Rivera [Wed, 23 Sep 2015 21:11:01 +0000 (16:11 -0500)]
staging: fsl-mc: up-rev dpmcp binary interface to v2.0

Add cmd_flags parameter to all dpbp APIs to comply
with the dpmcp 2.0 MC interface. Updated version
major number. Pass irq args in struct instead of
separate args.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: up-rev dpbp binary interface to v2.0
J. German Rivera [Wed, 23 Sep 2015 21:11:00 +0000 (16:11 -0500)]
staging: fsl-mc: up-rev dpbp binary interface to v2.0

Add cmd_flags parameter to all dpbp APIs to comply
with the dpbp 2.0 MC interface. Updated MC version
major number. Pass irq args in struct instead of
separate args.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: uprev dpmng binary interface to v8.0
J. German Rivera [Wed, 23 Sep 2015 21:10:59 +0000 (16:10 -0500)]
staging: fsl-mc: uprev dpmng binary interface to v8.0

Add cmd_flags parameter to all dpmng APIs to comply
with 8.0 MC firmware interface. Updated MC version
major number.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: Add new flags field to MC command header
J. German Rivera [Wed, 23 Sep 2015 21:10:58 +0000 (16:10 -0500)]
staging: fsl-mc: Add new flags field to MC command header

The Management Complex (MC) binary interface added a new "flags"
field to the command header.
Add the definitions for this field in preparation for adding the
new cmd_flags parameter to all MC interface APIs.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: Fix checkpatch block comments warnings
Sriram Raghunathan [Tue, 22 Sep 2015 17:05:51 +0000 (22:35 +0530)]
staging: android: Fix checkpatch block comments warnings

This patch is intended to fix the checkpatch warning for ``block``
comments for staging/android driver.

Signed-off-by: Sriram Raghunathan <sriram@marirs.net.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: remove RX complete locking.
Malcolm Priestley [Sun, 27 Sep 2015 08:17:44 +0000 (09:17 +0100)]
staging: vt6656: remove RX complete locking.

The lock in vnt_submit_rx_urb_complete is blocked by TX activity.

The lock comes from a time when RX needed to be synchronized with
other parts of the driver because the WLAN API was in driver.

Since this is now dealt with in mac80211 the lock is unnecessary.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: don't stop TX queue unless buffer full.
Malcolm Priestley [Sun, 27 Sep 2015 08:17:43 +0000 (09:17 +0100)]
staging: vt6656: don't stop TX queue unless buffer full.

Presently the TX buffer stops while filling the buffer and urb.

However, this does not make use of the available buffer
space, it also lags the speed of the TX troughtput.

Only stop the queue when the buffer becomes full. The
URB complete will start the queue again when a
buffer and URB is available.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: implement power saving.
Malcolm Priestley [Sun, 27 Sep 2015 08:17:42 +0000 (09:17 +0100)]
staging: vt6656: implement power saving.

The device can now operate in low power mode

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: implement power saving code.
Malcolm Priestley [Sun, 27 Sep 2015 08:17:41 +0000 (09:17 +0100)]
staging: vt6656: implement power saving code.

The device should ready to listen to next beacon so on count down of
wake_up_count == 1.

schedule command WLAN_CMD_TBTT_WAKEUP which calls vnt_next_tbtt_wakeup which
wakes the device.

This restores this back to vendors code with a slight difference the
count down is in the interrupt handler.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: implement TSF counter
Malcolm Priestley [Sun, 27 Sep 2015 08:17:40 +0000 (09:17 +0100)]
staging: vt6656: implement TSF counter

The TSF counter is presently unused on driver in infrastructure mode.

It is needed to implement power saving functions and wireless stats that
are passed in interrupt handling.

Ensuring counter is synced with access point beacon.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: don't stop TX queue unless buffer full.
Malcolm Priestley [Sun, 27 Sep 2015 08:17:39 +0000 (09:17 +0100)]
staging: vt6655: don't stop TX queue unless buffer full.

Presently the TX buffer stops while filling the buffer.

However, this does not make use of the available buffer
space, it also lags the speed of the TX troughtput.

Only stop the queue when the buffer becomes full. The
Interupt handler will start the queue again when a
buffer is available.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng remove unnessecary variable
Tillmann Heidsieck [Wed, 23 Sep 2015 20:07:55 +0000 (22:07 +0200)]
staging: wlan-ng remove unnessecary variable

The result variable is not set anywhere beyond its initialization,
therefore it can be remove.

Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng remove redundant conditional
Tillmann Heidsieck [Wed, 23 Sep 2015 20:07:54 +0000 (22:07 +0200)]
staging: wlan-ng remove redundant conditional

We exit the above loop either if curroff >= (HFA384x_PDA_LEN_MAX / 2 - 1)
or if we found the END marker in the element beyond the current one. The
first case is checked for in the preceding if statement, therefore the
second if statement is redundant and can be removed.

Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng fix buffer overflow in firmware handling
Tillmann Heidsieck [Wed, 23 Sep 2015 20:07:53 +0000 (22:07 +0200)]
staging: wlan-ng fix buffer overflow in firmware handling

We test for an END marker in the element beyond the current one, this
effectively limits the size of the array to be HFA384x_PDA_LEN_MAX/2 - 1
not HFA384x_PDR_END_OF_PDA/2. This patch fixes a possible buffer
overflow in case there was no END marker.

Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: replace twoToPowerOfx with shift operator
Mike Rapoport [Sun, 27 Sep 2015 13:25:43 +0000 (16:25 +0300)]
staging: sm750fb: replace twoToPowerOfx with shift operator

The function twoToPowerOfx that iteratively calculates the power of 2
may be replaced with shift operator

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused MB(x) and KB(x) macros
Mike Rapoport [Tue, 22 Sep 2015 09:01:18 +0000 (12:01 +0300)]
staging: sm750fb: remove unused MB(x) and KB(x) macros

The MB(x) and KB(x) macros are not used and therefore they can be
removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: replace custom MB(x) macro with appropriate SZ_xM
Mike Rapoport [Tue, 22 Sep 2015 09:01:17 +0000 (12:01 +0300)]
staging: sm750fb: replace custom MB(x) macro with appropriate SZ_xM

Use SZ_xM defined in linux/sizes.h instead of custom MB(x) macro

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: tidy up #include directives
Mike Rapoport [Tue, 22 Sep 2015 09:01:16 +0000 (12:01 +0300)]
staging: sm750fb: tidy up #include directives

Add space between '#include' keyword and the header name

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: sm750_help.h: spacing fix
Mike Rapoport [Tue, 22 Sep 2015 07:52:16 +0000 (10:52 +0300)]
staging: sm750fb: sm750_help.h: spacing fix

Remove unnecessary space in sm750_help.h to fix the following
checkpatch.pl error:
drivers/staging/sm750fb/sm750_help.h:46: space prohibited after that '~' (ctx:ExW)

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: fix returned errno code in dgap_parsefile()
Javier Martinez Canillas [Tue, 22 Sep 2015 00:39:36 +0000 (02:39 +0200)]
staging: dgap: fix returned errno code in dgap_parsefile()

The driver is using -1 instead of the -ENOMEM defined macro to specify
that a buffer allocation failed. Since the error number is propagated,
the caller will get a -EPERM which is the wrong error condition.

Also, the smatch tool complains with the following warning:

dgap_parsefile() warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wicl1000: remove duplicated operand in OR operation
Javier Martinez Canillas [Tue, 22 Sep 2015 14:24:58 +0000 (16:24 +0200)]
staging: wicl1000: remove duplicated operand in OR operation

The IEEE80211_STYPE_PROBE_REQ flag appears twice in the expression
and coccicheck complains with:

wilc_wfi_cfgoperations.h:80:3-38: duplicated argument to & or |

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Add s-Par visorhba
David Kershner [Thu, 24 Sep 2015 15:00:40 +0000 (11:00 -0400)]
staging: unisys: Add s-Par visorhba

This driver create a host bus adapter device when s-Par sends a
device create message to create a storage adapter on the visorbus.
When the message is received by visorbus, the visorhba_probe function
is called and the hba device is created and managed by the visorhba
driver.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: partially use time64_t for capa expiry
Arnd Bergmann [Sun, 27 Sep 2015 20:45:47 +0000 (16:45 -0400)]
staging/lustre: partially use time64_t for capa expiry

Here, we actually have a problem in 2038 or at the latest in 2106 when
the lc_expiry variable on the wire protocol overflows, including on
64-bit architectures.

Now that the actual code was removed, only on-the wire structure
is left so we add in a y2038 warning to remind whoever gets to
implement it again about this problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove mds/ost capabilities support
Oleg Drokin [Sun, 27 Sep 2015 20:45:46 +0000 (16:45 -0400)]
staging/lustre: Remove mds/ost capabilities support

Client capabilities is an outdated feature that never worked properly,
so let's get rid of the client support since modern servers
don't have this support either.

The patch is big, but since it just removes one large feature,
so it's hopefully easy to verify.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused debugfs/procfs helpers
Oleg Drokin [Sun, 27 Sep 2015 20:45:45 +0000 (16:45 -0400)]
staging/lustre: Remove unused debugfs/procfs helpers

These particular helpers are unused so let's get rid of them:
ldebugfs_add_symlink, lprocfs_rd_u64, lprocfs_rd_atomic,
lprocfs_wr_atomic, lprocfs_rd_name, lprocfs_seq_read_frac_helper

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused lprocfs_init_ldlm_stats
Oleg Drokin [Sun, 27 Sep 2015 20:45:44 +0000 (16:45 -0400)]
staging/lustre: Remove unused lprocfs_init_ldlm_stats

This is unused anywhere in the client code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove unused lprocfs_alloc/free_md_stats
Oleg Drokin [Sun, 27 Sep 2015 20:45:43 +0000 (16:45 -0400)]
staging/lustre: Remove unused lprocfs_alloc/free_md_stats

This code is not called anywhere in the current client code,
so we can remove it.
Also remove a helper function lprocfs_init_mps_stats

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obdclass: Remove unused lprocfs_alloc/free_obd_stats
Oleg Drokin [Sun, 27 Sep 2015 20:45:42 +0000 (16:45 -0400)]
staging/lustre/obdclass: Remove unused lprocfs_alloc/free_obd_stats

obd_stats in the form present were only used on the server,
so let's remove them from the client code
This also removes lprocfs_init_ops_stats helper.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: remove dt_object implementation
Arnd Bergmann [Sun, 27 Sep 2015 20:45:41 +0000 (16:45 -0400)]
staging/lustre: remove dt_object implementation

Nothing uses dt_object now, so we can kill the implementation
and the stale references.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/llog: remove unused server code
Arnd Bergmann [Sun, 27 Sep 2015 20:45:40 +0000 (16:45 -0400)]
staging/lustre/llog: remove unused server code

Most of the code in llog.c and llog_cat.c is completely unused
on the client and can be removed, as a preparation for removing
the dt_object code.

Two tricky parts are:

 - In llog_cat_close(), we rely on the fact that llh_flags never
   contains LLOG_F_ZAP_WHEN_EMPTY, because nobody ever sets that
   flag.

 - In llog_read_header(), we check the return value of the lpi_cb
   callback, and again we know that it cannot be LLOG_PROC_BREAK
   or LLOG_DEL_RECORD and can remove the respective code path.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Remove obd_export_evict_by_nid/uuid
Oleg Drokin [Sun, 27 Sep 2015 20:45:39 +0000 (16:45 -0400)]
staging/lustre: Remove obd_export_evict_by_nid/uuid

These functions only make sense on the server.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obdclass: Remove unused lprocfs_wr_evict_client
Oleg Drokin [Sun, 27 Sep 2015 20:45:38 +0000 (16:45 -0400)]
staging/lustre/obdclass: Remove unused lprocfs_wr_evict_client

This is only used on the servers to evict clients.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: remove CFS_TIME_T definition
Arnd Bergmann [Sun, 27 Sep 2015 20:45:37 +0000 (16:45 -0400)]
staging/lustre: remove CFS_TIME_T definition

The CFS_TIME_T macro serves no real purpose as we stopped using time_t
and changed over to time64_t, so we can remove the last remaining uses
of this.

Two uses of this macro are incorrect and refer to jiffies values
rather than time_t, and one refers to an inode timespec that gets
changed separately.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ptlrpc: Remove ptlrpc_update_export_timer()
Oleg Drokin [Sun, 27 Sep 2015 20:45:36 +0000 (16:45 -0400)]
staging/lustre/ptlrpc: Remove ptlrpc_update_export_timer()

This is only used on the server to keep track of alive clients
and feeds into ping evictor (that was removed from the client code).
Also remove struct obd's obd_exports_timed and
struct obd_export's exp_obd_chain_timed used to keep track of that

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: remove class_disconnect_export_list
Arnd Bergmann [Sun, 27 Sep 2015 20:45:35 +0000 (16:45 -0400)]
staging/lustre: remove class_disconnect_export_list

More code that makes no sense on the client and that can be
removed without replacement.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: remove unused time handling functions
Arnd Bergmann [Sun, 27 Sep 2015 20:45:34 +0000 (16:45 -0400)]
staging/lustre: remove unused time handling functions

A bunch of API functions deal with time values but are now
completely unused in lustre. This removes them in order to
remove all references to time_t from the header files.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: remove wrappers for timer functions
Arnd Bergmann [Sun, 27 Sep 2015 20:45:33 +0000 (16:45 -0400)]
staging/lustre: remove wrappers for timer functions

This is a simple cleanup that I did after noticing that the abstraction
for the timer functions in completely pointless, and the one user (ptlrpc)
can just as well call the native Linux functions.

For good measure, this also removes the empty libcfs_arch_init()
and libcfs_arch_cleanup() functions that are defined in the
same file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/lov: remove a bit of dead code
Arnd Bergmann [Sun, 27 Sep 2015 20:45:32 +0000 (16:45 -0400)]
staging/lustre/lov: remove a bit of dead code

lov_stripe_md_cmp lov_lum_lsm_cmp lov_lum_swab_if_needed functions
have not been in used for a long time, so lets just remove them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: remove the ping evictor
Arnd Bergmann [Sun, 27 Sep 2015 20:45:31 +0000 (16:45 -0400)]
staging/lustre: remove the ping evictor

This code is never used on the client and can simply be removed.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times for request times
Arnd Bergmann [Sun, 27 Sep 2015 20:45:30 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times for request times

All request timestamps and deadlines in lustre are recorded in time_t
and timeval units, which overflow in 2038 on 32-bit systems.

In this patch, I'm converting them to time64_t and timespec64,
respectively. Unfortunately, this makes a relatively large patch,
but I could not find an obvious way to split it up some more without
breaking atomicity of the change.

Also unfortunately, this introduces two instances of div_u64_rem()
in the request path, which can be slow on 32-bit architectures. This
can probably be avoided by a larger restructuring of the code, but
it is unlikely that lustre is used in performance critical setups
on 32-bit architectures, so it seems better to optimize for correctness
rather than speed here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times for ptlrpc_sec
Arnd Bergmann [Sun, 27 Sep 2015 20:45:29 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times for ptlrpc_sec

Here we use an unsigned long to store the timeout for gc,
which is probably safe until 2106, but this patch converts it
to use ktime_get_real_seconds() and time64_t for consistency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times for ptlrpc sec expiry
Arnd Bergmann [Sun, 27 Sep 2015 20:45:28 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times for ptlrpc sec expiry

The exp_flvr_expire and imp_sec_expire are defined as 'unsigned long',
which doesn't overflow until 2106, but to be on the safe side, this
changes the code to use time64_t like we do everywhere else.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit timestamps for mdc
Arnd Bergmann [Sun, 27 Sep 2015 20:45:27 +0000 (16:45 -0400)]
staging/lustre: use 64-bit timestamps for mdc

These three are timestamps that are sent over the wire in mdc_lib
and the obd logging 64-bit values, but are generated using the 32-bit
get_seconds() function, which will eventually overflow.

Changing them to use 64-bit ktime_get_real_seconds() solves the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times in another debug print
Arnd Bergmann [Sun, 27 Sep 2015 20:45:26 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times in another debug print

The ll_setattr_raw() function prints the new inode timestamps
along with the current time using '%lu', which overflows in
2106. This changes the printing of the current time for
now, the other two will change when we migrate the VFS code
to use 64-bit timestamps.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times in debug print
Arnd Bergmann [Sun, 27 Sep 2015 20:45:25 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times in debug print

This adapts the format string and get_seconds() call to not
overflow in 2038 in the libcfs_debug_dumplog_internal()
function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times in ptlrpc_enc_page_pool
Arnd Bergmann [Sun, 27 Sep 2015 20:45:24 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times in ptlrpc_enc_page_pool

ptlrpc_enc_page_pool computes time deltas using 'long' values from
get_seconds(). This is probably safe beyond y2038, but it's better
to go use monotonic times and 64-bit here for consistency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit time for selftest
Arnd Bergmann [Sun, 27 Sep 2015 20:45:23 +0000 (16:45 -0400)]
staging/lustre: use 64-bit time for selftest

The lustre selftest code has multiple time stamps that are kept
as 'time_t' or 'unsigned long' and can therefore overflow on
32-bit systems.

This changes the code to use time64_t instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit time for ni_last_alive
Arnd Bergmann [Sun, 27 Sep 2015 20:45:22 +0000 (16:45 -0400)]
staging/lustre: use 64-bit time for ni_last_alive

The ni_last_alive member of lnet_ni uses a 'long' to store a timestamp,
which breaks on 32-bit systems in 2038.

This changes it to use time64_t and the respective functions for it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times for ksnd_connd
Arnd Bergmann [Sun, 27 Sep 2015 20:45:21 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times for ksnd_connd

The connection starting/failing time stamps will overflow in 2038
on 32-bit machines, so we need to use time64_t and ktime_get_real_seconds()
instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit llite debugfs timestamps
Arnd Bergmann [Sun, 27 Sep 2015 20:45:20 +0000 (16:45 -0400)]
staging/lustre: use 64-bit llite debugfs timestamps

The llite debugfs interface contains timestamps that are computed
from timeval, which overflows in 2038 on 32-bit systems.

This changes the output to use a timespec64 type to avoid the
overflow. I also change the format to print the sub-second portion
as 9 digits (nanoseconds) for clarity, rather than printing six
digits without leading zeroes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit time for adaptive timeout
Arnd Bergmann [Sun, 27 Sep 2015 20:45:19 +0000 (16:45 -0400)]
staging/lustre: use 64-bit time for adaptive timeout

The adaptive timeout handling stores absolute times in 32-bit time_t
quantities, which will overflow in 2038.

This changes it to use time64_t.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit time for debugfs output
Arnd Bergmann [Sun, 27 Sep 2015 20:45:18 +0000 (16:45 -0400)]
staging/lustre: use 64-bit time for debugfs output

This time is only printed in debugfs, and can be easily converted
to 64-bit to avoid overflowing on 32-bit systems in 2038.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit time for pl_recalc
Arnd Bergmann [Sun, 27 Sep 2015 20:45:17 +0000 (16:45 -0400)]
staging/lustre: use 64-bit time for pl_recalc

The ldlm pool calculates elapsed time by comparing the previous and
current get_seconds() values, which is unsafe on 32-bit machines
after 2038.

This changes the code to use time64_t and ktime_get_real_seconds(),
keeping the 'real' instead of 'monotonic' time because of the
debug prints.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit timestamps for selftest
Arnd Bergmann [Sun, 27 Sep 2015 20:45:16 +0000 (16:45 -0400)]
staging/lustre: use 64-bit timestamps for selftest

The wire protocol for the ping uses a 64-bit seconds/microseconds
pair, but this won't work when one side uses a 32-bit timeval
to look up the current time beyond 2038.

This changes the code to use ktime_get_real_ts64() to create
a timestamp that has the right format on all machines.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit computation in s2dhms()
Arnd Bergmann [Sun, 27 Sep 2015 20:45:15 +0000 (16:45 -0400)]
staging/lustre: use 64-bit computation in s2dhms()

The s2dhms computes the day/hour/minute/second values from a time_t,
which stops working in 2038. This changes the code to take a time64_t
argument, and use div_u64_rem() to implement the first division.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use 64-bit times for cfs_srand seed
Arnd Bergmann [Sun, 27 Sep 2015 20:45:14 +0000 (16:45 -0400)]
staging/lustre: use 64-bit times for cfs_srand seed

Several functions in Lustre call cfs_srand with do_gettimeofday
as the seed to get a pseudo-random number.
There is no bug here, but changing it to use ktime_get_ts64()
gets us closer to deprecating do_gettimeofday() and makes it slightly
more random.

Affected functions are:
lnet_shuffle_seed, init_lustre_lite and class_handle_init

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>