summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)Author
2015-11-16staging: rtl8188eu: initial value placed in the variableIvan Safonov
Line become shorter. After the loop offset variable points to the location following insertion. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rtl8188eu: assigning a value to the variable is replaced by the ↵Ivan Safonov
increment It is made to the initial value could be placed in the offset variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rtl8188eu: *(ptr + i) replaced by ptr[i] in _rtl88e_fw_block_writeIvan Safonov
It is better to read. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: rtl8188eu: fix space prohibited before that ','Abdul Hussain
This patch fixes the following checkpatch.pl error: fix space prohibited before that ',' Signed-off-by: Abdul Hussain <hussain.abdul@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rtl8188eu: 'infinite' loop removedIvan Safonov
The body of this loop is executed only once, so it can be removed. In this loop no keyword 'continue', only 'break' at the end. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rtl8188eu: while loop replaced by for loopIvan Safonov
Here is more suitable for loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rtl8188eu: do .. while (0) loop replaced by while (...) loopIvan Safonov
It is a simple and clear representation of this loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rtl8188eu: add missing delay in polling loops.Rémy Oudompheng
Previously the code could exit with failure too early. Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rtl8188eu: jiffies are unsigned longRémy Oudompheng
Remove rtw_get_passing_time_ms function and adjust type of relevant variables. Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: lustre: ldlm_pool: Drop unneeded wrapper functionShivani Bhardwaj
Remove the function ldlm_pool_set_limit() and replace its calls with the function it wrapped. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: lustre: ldlm_pool: Drop wrapper functionShivani Bhardwaj
Remove the function ldlm_pool_get_limit() and replace its calls with the function it wrapped. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: lustre: ldlm_pool: Remove unneeded wrapper functionShivani Bhardwaj
Remove the function ldlm_pl2ns() and replace its calls with the function it wrapped. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: lustre: tracefile: Remove function prototypeShivani Bhardwaj
Remove the prototype of function cfs_trace_free_string_buffer() as it is no longer needed. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: lustre: tracefile: Remove wrapper functionShivani Bhardwaj
Remove the function cfs_trace_free_string_buffer() as it can be replaced with the standard function kfree(). Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: lustre: module: Replace function callsShivani Bhardwaj
Replace the calls of function cfs_trace_free_string_buffer() with kfree() as the former function is not required. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16Staging: lustre: dir: Remove wrapper functionShivani Bhardwaj
Remove the function ll_check_page() and replace all its calls with the function it wrapped. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: lnet: klnds: socklnd: Move extern declarations to headerAmitoj Kaur Chawla
This patch moves extern declarations in socklnd_lib.c to the respective header file, 'socklnd.h'. This patch also removes extern keyword from function declarations since functions have the extern specifier by default. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: Delete an unnecessary variable initialisation in ↵Markus Elfring
class_register_type() The variable "rc" will be eventually set to an error return code in the class_register_type() function. Thus let us omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: fix 'error handling' issues for libcfs workitem.cSebastien Buisson
Fix 'error handling' issues found by Coverity version 6.5.1: Unchecked return value (CHECKED_RETURN) Calling function without checking return value. Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3427 Reviewed-on: http://review.whamcloud.com/7103 Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: remove page_collection::pc_lock in libcfsLiang Zhen
page_collection::pc_lock is supposed to protect race between functions called by smp_call_function(), however we don't have this use-case for ages and page_collection only lives in stack of thread, so it is safe to remove it. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3055 Reviewed-on: http://review.whamcloud.com/7660 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: race condition for check/use cfs_fail_valFan Yong
There are some race conditions when check/use cfs_fail_val. For example: when inject failure stub for LFSCK test as following: 764 if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_DELAY2) && 765 cfs_fail_val > 0) { 766 struct l_wait_info lwi; 767 768 lwi = LWI_TIMEOUT(cfs_time_seconds(cfs_fail_val), 769 NULL, NULL); 770 l_wait_event(thread->t_ctl_waitq, 771 !thread_is_running(thread), 772 &lwi); 773 774 if (unlikely(!thread_is_running(thread))) { 775 CDEBUG(D_LFSCK, "%s: scan dir exit for engine " 776 "stop, parent "DFID", cookie "LPX64"n", 777 lfsck_lfsck2name(lfsck), 778 PFID(lfsck_dto2fid(dir)), 779 lfsck->li_cookie_dir); 780 RETURN(0); 781 } 782 } The "cfs_fail_val" may be changed as zero by others after the check at the line 765 but before using it at the line 768. Then the LFSCK engine will fall into "wait" until someone run "lfsck_stop". Signed-off-by: Fan Yong <fan.yong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6146 Reviewed-on: http://review.whamcloud.com/13481 Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: Update module author to OpenSFSJames Simmons
The modinfo data has gone stale for the author information. This patch changes all the MODULE_AUTHOR to OpenSFS. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204 Reviewed-on: http://review.whamcloud.com/16132 Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: Fix possible NULL pointer dereference in lprocfs_status.cDmitry Eremin
The imp->imp_connection really could be NULL, we better check for it before dereferencing it in taht call to libcfs_nid2str_r. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6507 Reviewed-on: http://review.whamcloud.com/14808 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: fix buffer overflow of string bufferDmitry Eremin
Buffer overflow of string buffer due to non null terminated string. Use strlcpy() when it's justifiable. Use sizeof(var) instead of constants. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/9389 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: remove libcfs_debug_set_level prototype from libcfs_private.hfrank zago
The function libcfs_debug_set_level is used only internally so no reason to expose it in libcfs_private.h. This is broken out from LU-5829 patch http://review.whamcloud.com/13319. Signed-off-by: frank zago <fzago@cray.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: remove unnecessary EXPORT_SYMBOL in libcfsfrank zago
A lot of symbols don't need to be exported at all because they are only used in the module they belong to. Signed-off-by: frank zago <fzago@cray.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829 Reviewed-on: http://review.whamcloud.com/13319 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: wrong parameter to cfs_hash_keycpyLiang Zhen
cfs_hash_rehash_key() passed wrong parameter to cfs_hash_keycpy, hnode should be the second parameter not the third one. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4362 Reviewed-on: http://review.whamcloud.com/8509 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Johann Lombardi <johann.lombardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: remove unused variableDan Carpenter
The "->lr_lvb_data" struct member is never used. Delete it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: selftest.h: replace IS_PO2 by is_power_of_2Aya Mahfouz
Replaces IS_PO2 by is_power_of_2. It is more accurate to use is_power_of_2 since it returns 1 for numbers that are powers of 2 only whereas IS_PO2 returns 1 for 0 and numbers that are powers of 2. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: workitem.c: replace IS_PO2 by is_power_of_2Aya Mahfouz
Replaces IS_PO2 by is_power_of_2. It is more accurate to use is_power_of_2 since it returns 1 for numbers that are powers of 2 only whereas IS_PO2 returns 1 for 0 and numbers that are powers of 2. Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: lustre: ldlm_extent.c: replace IS_PO2 by is_power_of_2Aya Mahfouz
Replaces IS_PO2 by is_power_of_2. It is more accurate to use is_power_of_2 since it returns 1 for numbers that are powers of 2 only whereas IS_PO2 returns 1 for 0 and numbers that are powers of 2. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rdma: hfi1 : Prefer using the BIT macroSunny Kumar
This patch replaces bit shifting on 1 with the BIT(x) macro Signed-off-by: Sunny Kumar <sunnyk@cdac.in> Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: rdma: amso1100: c2: Remove wrapper functionAmitoj Kaur Chawla
This patch removes the c2_print_macaddr() wrapper function which calls the pr_debug standard kernel function only. c2_print_macaddr() has been replaced by directly calling pr_debug(). Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging/rdma/hfi1: optionally prescan rx queue for {B, F}ECNs - UC, RCArthur Kepner
To more rapidly respond to Explicit Congestion Notifications, prescan the receive queue, and process FECNs, and BECNs first. When a UC, or RC packet containing a FECN, or BECN is found, immediately react to the ECN (either by returning a CNP, or adjusting the injection rate). Afterward, the packet will be processed normally. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Arthur Kepner <arthur.kepner@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging/rdma/hfi1: don't cache "prescan head"Arthur Kepner
When HFI1_CAP_DMA_RTAIL is toggled off the "prescan head" can get out of sync with the receive context's "head". This happens when, after prescan_rxq() newly arrived packets are then received, and processed by an RX interrupt handler. This is an unavoidable race, and to avoid getting out of sync we always start prescanning at the current "rcd->head" entry. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Arthur Kepner <arthur.kepner@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging/rdma/hfi1: Move macros to a common headerMitko Haralanov
In preparation of implementing TID caching move EXP_TID macros to a common header user_exp_rcv.h Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging/rdma/hfi1: Remove unnecessary include filesMitko Haralanov
These includes were not used in file_ops.c Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging/rdma/hfi1: Clean up macro indentationMitko Haralanov
In preparation for implementing Expected TID caching we do some simple clean up of header file macros. Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging/rdma/hfi1: Remove file pointer macrosIra Weiny
Remove the following macros in favor of explicit use of struct hfi1_filedata and various sub structures. ctxt_fp subctxt_fp tidcursor_fp user_sdma_pkt_fp user_sdma_comp_fp Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: remove rates variable in host_int_add_stationChaehyun Lim
Instead of using rates variable, it is used as add_sta_info->rates directly. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: use kmemdup in host_int_add_stationChaehyun Lim
This patch replaces kmalloc followed by memcpy with kmemdup. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: rename pstrAddStationMsg in host_int_add_stationChaehyun Lim
This patch renames pstrAddStationMsg to add_sta_info to avoid camelcase. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: rename pstrStaParams in host_int_add_stationChaehyun Lim
This patch renames pstrStaParams to sta_param to avoid camelcase. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: fix parameter name of host_int_add_stationChaehyun Lim
This patch changes struct host_if_drv of host_int_add_station function declaration from hWFIDrv to hif_drv. With this change, first parameter of this function declaration and definition has same name as hif_drv. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: fix return type of host_int_add_stationChaehyun Lim
This patch changes return type of host_int_add_station from s32 to int. The result variable gets return value from wilc_mq_send that has return type of int. It should be changed return type of this function as well as data type of result variable. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: rename pstrDelStationMsg in host_int_del_stationChaehyun Lim
This patch renames pstrDelStationMsg to del_sta_info to avoid camelcase. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: rename pu8MacAddr in host_int_del_stationChaehyun Lim
This patch changes pu8MacAddr to mac_addr that is second argument of this function to avoid camelcase. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: fix parameter name of host_int_del_stationChaehyun Lim
This patch changes struct host_if_drv of host_int_del_station function declaration from hWFIDrv to hif_drv. With this change, first parameter name of this function declaration and definition has same name as hif_drv. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: fix return type of host_int_del_stationChaehyun Lim
This patch changes return type of host_int_del_station from s32 to int. The result variable gets return value from wilc_mq_send that has return type of int. It should be changed return type of this function as well as data type of result variable. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: wilc1000: fix parameter name of host_int_del_beaconChaehyun Lim
This patch changes struct host_if_drv of host_int_del_beacon function declaration from hWFIDrv to hif_drv. With this change, first parameter name of this function declaration and definition has same name as hif_drv. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>