- 29 Sep, 2015 40 commits
-
-
Arnd Bergmann authored
The cfs_duration_sec() converts a relative jiffies value into seconds, and returns that number as a time_t. We know that a 32-bit type is enough here, because the result is order of magnitudes smaller than the difference in jiffies that is also expressed as a 'long', so we can safely replace the time_t type with long as well. 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>
-
Arnd Bergmann authored
This ioctl function passes a 64-bit time argument but then performs a computation with a 32-bit get_seconds() value. In order to avoid overflow here, this changes the code to use 64-bit math and ktime_get_real_seconds(). 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>
-
Arnd Bergmann authored
The lnet_eq_wait_locked tries to wait for time to pass or an event to wake up the wait queue. The entire logic seems to be a very elaborate reimplementation of wait_event(). I'm not trying to clean up the entire logic here, but this at least gets rid of the multi-way conversion between miliseconds, timeval and jiffies. 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>
-
Arnd Bergmann authored
The rq_at_index member of ptlrpc_request is incorrectly declared as time_t, when it is only used as an index into an array, and assigned from a __u32 variable. This changes the type to u32, so we can kill off another use of time_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>
-
Arnd Bergmann authored
process_param2_config() tries to print how much time has passed across a call_usermodehelper() function, and uses struct timeval for that. We want to remove this structure, so this is better expressed in terms of ktime_t and ktime_us_delta(). 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>
-
Arnd Bergmann authored
The l_last_activity struct member is used to keep track lock hold times, and it is printed for debugging purposes. For the elapsed time, we can use 'long' here, but it's better to use time64_t for storing the real time to avoid an overflow 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>
-
Arnd Bergmann authored
Some lustre debugfs files contain the current time. Make sure we use a format here that does not overflow 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>
-
Arnd Bergmann authored
The lustre tracefile has a timestamp defined as __u32 ph_sec; __u64 ph_usec; which seems completely backwards, as the microsecond portion of a time stamp will always fit into a __u32 value, while the second portion will overflow in 2038 or 2106 (in case of unsigned seconds). Changing this would unfortunately change the format in an incompatible way, breaking all existing user space tools that access the data. This uses ktime_get_real_ts64() to replace the insufficient do_gettimeofday() and then truncates the seconds portion to an u32 type, along with comments to explain the result. A possible alternative would be the use of ktime_get_ts64() to read a monotonic timestamp that never overflows, but this would trigger a check in user space 'hdr->ph_sec < (1 << 30)' that attempts to ensure that the values are within a reasonable range. 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>
-
Arnd Bergmann authored
We want to get rid of all uses of time_t, and it turns out that obd.h contains a bunch of them that are completely unused. This removes those structures, along with a couple of other structures and functions in the same file that also turned out to be unused. 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>
-
Arnd Bergmann authored
Lustre has 64-bit timestamps in its network data structures, but on 32 bit systems, it converts them directly into time_t, which is 32 bit wide. This changes the code to use 64-bit time stamps for files. The Linux VFS code still uses time_t though, and will be changed in a separate patch series. 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>
-
Arnd Bergmann authored
The recently introduced lnet_peer_set_alive() function uses get_seconds() to read the current time into a shared variable, but all other uses of that variable compare it to jiffies values. This changes the current use to jiffies as well for consistency. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: af3fa7c7 ("staging/lustre/lnet: peer aliveness status and NI status") Cc: Liang Zhen <liang.zhen@intel.com> Cc: James Simmons <uja.ornl@gmail.com> Cc: Isaac Huang <he.huang@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jayavant Kenjalkar authored
Removing redundant semicolon as detected by coccicheck. Signed-off-by: Jayavant Kenjalkar <jgkenjalkar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anton Gerasimov authored
Declare non-exported functions as static. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anton Gerasimov authored
Include the header with declarations of variables that are shared between several sources in ptlrpc module into the appropriate source files. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anton Gerasimov authored
This patch moves declarations of variables used in several files across the ptlrpc module from source files to a local header. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mike Rapoport authored
Convert C99-style // comments to C89-style comments and fix C99_COMMENTS checpatch errors. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andrzej Hajda authored
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andrzej Hajda authored
Unsigned cannot be negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ira Weiny authored
STAGING_RDMA was failing to build when INFINIBAND was set to 'm' and STAGING_RDMA was set to 'y'. Making this a tristate properly inherits the 'm' from the INFINIBAND setting. Reviewed-by: Dalessandro, Dennis <dennis.dalessandro@intel.com> Reviewed-by: John, Jubin <jubin.john@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Geliang Tang authored
Fixed warnings found by checkpatch.pl: Please use a blank line after function/struct/union/enum declarations FILE: drivers/staging/rdma/amso1100/c2_mq.c:158: FILE: drivers/staging/rdma/hfi1/file_ops.c:2069: FILE: drivers/staging/rdma/hfi1/sdma.c:744: FILE: drivers/staging/rdma/hfi1/verbs.c:1202: Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Geliang Tang authored
Fixes the following sparse warning: drivers/staging/rdma/hfi1/device.c:127:12: warning: symbol 'class_name_user' was not declared. Should it be static? Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Geliang Tang authored
Use kvfree() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Iooss authored
hfi1_rc_hdrerr() stores the result of be32_to_cpu() into opcode, which is a local variable declared as u8. Later this variable is used in a 24-bit logical right shift, which makes clang complains (when building an allmodconfig kernel with LLVMLinux patches): drivers/staging/rdma/hfi1/rc.c:2399:9: warning: shift count >= width of type [-Wshift-count-overflow] opcode >>= 24; ^ ~~ All of this lead to the point that opcode may have been designed to be a 32-bit integer instead of an 8-bit one. Therefore make this variable u32. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_ctrl_initgain_byrssi to _rtl92e_dm_ctrl_initgain_byrssi. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename firmware_check_ready to _rtl92e_fw_check_ready. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename r8192_wx_set_enc to _rtl92e_wx_set_enc. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_tx_update_tssi_weak_signal to _rtl92e_dm_tx_update_tssi_weak_signal. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_tx_update_tssi_strong_signal to _rtl92e_dm_tx_update_tssi_strong_signal. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_TXPowerTrackingCallback_TSSI to _rtl92e_dm_tx_power_tracking_callback_tssi. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_TXPowerTrackingCallback_ThermalMeter to _rtl92e_dm_tx_power_tracking_cb_thermal. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_txpower_reset_recovery to _rtl92e_dm_tx_power_reset_recovery. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_StartSWFsync to _rtl92e_dm_start_sw_fsync. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_StartHWFsync to _rtl92e_dm_start_hw_fsync. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_send_rssi_tofw to _rtl92e_dm_send_rssi_to_fw. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_rxpath_sel_byrssi to _rtl92e_dm_rx_path_sel_byrssi. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_pd_th to _rtl92e_dm_pd_th. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_Init_WA_Broadcom_IOT to _rtl92e_dm_init_wa_broadcom_iot. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_InitializeTXPowerTracking_TSSI to _rtl92e_dm_initialize_tx_power_tracking_tssi. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_init_rxpath_selectio to _rtl92e_dm_init_rx_path_selection. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mateusz Kulikowski authored
Use naming schema found in other rtlwifi devices. Rename dm_InitializeTXPowerTracking_ThermalMeter to _rtl92e_dm_init_tx_power_tracking_thermal. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-