summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-03-06staging: pi433: fix CamelCase for afterSyncInterruptValentin Vidic
Fixes checkpatch warning: CHECK: Avoid CamelCase: <afterSyncInterrupt> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: pi433: fix CamelCase for flag enumValentin Vidic
Fixes checkpatch warnings: CHECK: Avoid CamelCase: <modeSwitchCompleted> CHECK: Avoid CamelCase: <readyToReceive> CHECK: Avoid CamelCase: <readyToSend> CHECK: Avoid CamelCase: <pllLocked> CHECK: Avoid CamelCase: <rssiExceededThreshold> CHECK: Avoid CamelCase: <syncAddressMatch> CHECK: Avoid CamelCase: <packetSent> CHECK: Avoid CamelCase: <crcOk> CHECK: Avoid CamelCase: <batteryLow> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: pi433: fix CamelCase for packetFormat enumValentin Vidic
Fixes checkpatch warnings: CHECK: Avoid CamelCase: <packetFormat> CHECK: Avoid CamelCase: <packetLengthFix> CHECK: Avoid CamelCase: <packetLengthVar> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06Revert "staging: Disable lustre file system for MIPS, SH, and XTENSA"NeilBrown
This reverts commit 16f1eeb660bd2bfd223704ee6350706b39c55a7a. The reason for this patch was that lustre used copy_from_user_page. Commit 76133e66b141 ("staging/lustre: Replace jobid acquiring with per node setting") removed that usage. So the arch restrictions can go. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: allow monolithic buildsNeilBrown
Remove restriction the lustre must be built as modules. It now works as a monolithic build. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: ptlrpc: move thread creation out of module initializationNeilBrown
When the ptlrpc module is loaded, it starts the pinger thread and calls LNetNIInit which starts various threads. We don't need these threads until the module is actually being used, such as when a lustre filesystem is mounted. So move the thread creation into new ptlrpc_inc_ref() (modeled on ptlrpcd_inc_ref()), and call that when needed, such as at mount time. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: change sai_thread to sai_task.NeilBrown
Rather than allocating a ptlrpc_thread for the stat-ahead thread, just use the task_struct provided by kthreads directly. As nothing ever waits for the sai_task, it must call do_exit() directly rather than simply return from the function. Also it cannot use kthread_should_stop() to know when to stop. There is one caller which can ask it to stop so we need a simple signaling mechanism. I've chosen to set ->sai_task to NULL when the thread should finish up. The thread notices this and cleans up and exits. lli_sa_lock is used to avoid races between waking up the process and the process exiting. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: remove 'ptlrpc_thread usage' for sai_agl_threadNeilBrown
Lustre has a 'struct ptlrpc_thread' which provides control functionality wrapped around kthreads. None of the functionality used in statahead.c requires ptlrcp_thread - it can all be done directly with kthreads. So discard the ptlrpc_thread and just use a task_struct directly. One particular change worth noting is that in the current code, the thread performs some start-up actions and then signals that it is ready to go. In the new code, the thread is first created, then the startup actions are perform, then the thread is woken up. This means there is no need to wait any more than kthread_create() already waits. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: remove unused flag from ptlrpc_threadNeilBrown
SVC_EVENT is no longer used. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: ptlrpc: use workqueue for pingerNeilBrown
lustre has a "Pinger" kthread which periodically pings peers to ensure all hosts are functioning. This can more easily be done using a work queue. As maintaining contact with other peers is import for keeping the filesystem running, and as the filesystem might be involved in freeing memory, it is safest to have a separate WQ_MEM_RECLAIM workqueue. The SVC_EVENT functionality to wake up the thread can be replaced with mod_delayed_work(). Also use round_jiffies_up_relative() rather than setting a minimum of 1 second delay. The PING_INTERVAL is measured in seconds so this meets the need is allow the workqueue to keep wakeups synchronized. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: ptlrpc: use delayed_work in sec_gcNeilBrown
The garbage collection for security contexts currently has a dedicated kthread which wakes up every 30 minutes to discard old garbage. Replace this with a simple delayed_work item on the system work queue. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: ldlm: use delayed_work for pools_recalcNeilBrown
ldlm currenty has a kthread which wakes up every so often and calls ldlm_pools_recalc(). The thread is started and stopped, but no other external interactions happen. This can trivially be replaced by a delayed_work if we have ldlm_pools_recalc() reschedule the work rather than just report when to do that. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: obdclass: use workqueue for zombie management.NeilBrown
obdclass currently maintains two lists of data structures (imports and exports), and a kthread which will free anything on either list. The thread is woken whenever anything is added to either list. This is exactly the sort of thing that workqueues exist for. So discard the zombie kthread and the lists and locks, and create a single workqueue. Each obd_import and obd_export gets a work_struct to attach to this workqueue. This requires a small change to import_sec_validate_get() which was testing if an obd_import was on the zombie list. This cannot have every safely found it to be on the list (as it could be freed asynchronously) so it must be dead code. We could use system_wq instead of creating a dedicated zombie_wq, but as we occasionally want to flush all pending work, it is a little nicer to only have to wait for our own work items. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: ptlrpc: change GFP_NOFS to GFP_KERNELNeilBrown
These allocations are performed during initialization, so they don't need GFP_NOFS. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: get entropy from nid when nid set.NeilBrown
When the 'lustre' module is loaded, it gets a list of net devices and uses the node ids to add entropy to the prng. This means that the network interfaces need to be configured before the module is loaded, which prevents the module from being compiled into a monolithic kernel. So move this entropy addition to the moment when the interface is imported to LNet and the node id is first known. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: lnet: keep ln_nportals consistentNeilBrown
ln_nportals should be zero when no portals have been allocated. This ensures that memory allocation failure is handled correctly elsewhere. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: obdclass: don't require lct_owner to be non-NULL.NeilBrown
Some places in lu_object.c allow lct_owner to be NULL, implying that the code is built in to the kernel (not a module), but two places don't. This prevents us from building lustre into the kernel. So remove the requirement and always allow lct_owner to be NULL. This requires removing an "assert" that the module count is positive, but this is redundant as module_put() already does the necessary test. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: statahead: remove incorrect test on agl_list_empty()NeilBrown
Including agl_list_empty() in the wait_event_idle() condition is pointless as the body of the loop doesn't do anything about the agl list. So if the list wasn't empty, the while loop would spin indefinitely. The test was removed in the lustre-release commit 672ab0e00d61 ("LU-3270 statahead: small fixes and cleanup"), but not in the Linux commit 5231f7651c55 ("staging: lustre: statahead: small fixes and cleanup"). Fixes: 5231f7651c55 ("staging: lustre: statahead: small fixes and cleanup") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: fix bug in osc_enter_cache_tryNeilBrown
The lustre-release patch commit bdc5bb52c554 ("LU-4933 osc: Automatically increase the max_dirty_mb") changed - if (cli->cl_dirty + PAGE_CACHE_SIZE <= cli->cl_dirty_max && + if (cli->cl_dirty_pages < cli->cl_dirty_max_pages && When this patch landed in Linux a couple of years later, it landed as - if (cli->cl_dirty + PAGE_SIZE <= cli->cl_dirty_max && + if (cli->cl_dirty_pages <= cli->cl_dirty_max_pages && which is clearly different ('<=' vs '<'), and allows cl_dirty_pages to increase beyond cl_dirty_max_pages - which causes a latter assertion to fails. Fixes: 3147b268400a ("staging: lustre: osc: Automatically increase the max_dirty_mb") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: obd_mount: use correct niduuid suffix.NeilBrown
Commit 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") moved some sprintf() calls earlier in the code to combine them with memory allocation and create kasprintf() calls. In one case, this code movement moved the sprintf to a location where the values being formatter were different. In particular sprintf(niduuid, "%s_%x", mgcname, i); was move from *after* the line i = 0; to a location where the value of 'i' was at least 1. This cause the wrong name to be formatted, and triggers CERROR("del MDC UUID %s failed: rc = %d\n", niduuid, rc); at unmount time. So use '0' instead of 'i'. Fixes: 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: remove else after return statementSantha Meena Ramamoorthy
Remove else after a return statement as it is not useful. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: fsl-mc/dpio: remove unused functionAnders Roxell
gcc warns that function 'qbman_pull_desc_set_token' is not used. drivers/staging/fsl-mc/bus/dpio/qbman-portal.c:525:13: warning: ‘qbman_pull_desc_set_token’ defined but not used [-Wunused-function] In the current code we remove that function. Fixes: 321eecb06bfb ("bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: rename u16DummyReasonCode to avoid camelCaseAjay Singh
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in handle_rcvd_ntwrk_info()Ajay Singh
Fix 'line over 80 character' issues found by checkpatch.pl script by use of temporary variable and avoided leading tab. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: rename handle_connect_timeout() variables to avoid camelCaseAjay Singh
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in wilc_scan_complete_received()Ajay Singh
Fix 'line over 80 character' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in wilc_del_allstation() & ↵Ajay Singh
wilc_deinit() Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in wilc_add_ptk()Ajay Singh
Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: rename pstrHostIFkeyAttr to avoid camelCase issueAjay Singh
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in host_int_parse_join_bss_param()Ajay Singh
Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char for wilc_gnrl_async_info_received()Ajay Singh
Fix 'line over 80 char' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in wilc_network_info_received()Ajay Singh
Fix 'line over 80 character' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in handle_cfg_param()Ajay Singh
Fix 'line over 80 char' issues found by checkpatch.pl script in handle_cfg_param(). Rename variables and used temporary variables to fix the line over 80 characters issue. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: remove always 'true' check from 'if' statementAjay Singh
Fix few smatch warning related to 'warn: always true condition'. handle_cfg_param() warn: always true condition '(cfg_param_attr->auth_timeout < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->rts_threshold < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->beacon_interval < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->site_survey_scan_time < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->active_scan_time < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->passive_scan_time < 65536) => (0-u16max < 65536)' Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: rename enuEvent to avoid camelCaseAjay Singh
Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in wilc_wlan_handle_rxq()Ajay Singh
Refactor wilc_wlan_handle_rxq() to fix line over 80 character issue found by checkpatch.pl script. Added a new function to split 'wilc_wlan_handle_rxq' function code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set()Ajay Singh
Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: wilc1000: fix open parenthesis mismatch in wilc_wlan_cfg_get()Ajay Singh
Fix 'Alignment should match open parenthesis' issue found by checkpatch.pl script. Reduce the leading tab, to make space for open parenthesis match. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: most: Indent function parameter.Quytelda Kahja
Indent the parameters for a function call that extends past 80 characters. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: most: Add a blank line.Quytelda Kahja
Use a blank line after components_show() function declaration. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: ks7010: Replace literal with constant.Quytelda Kahja
Replace literal bytestring with CIPHER_ID_WPA_WEP40 constant. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: emxx_udc: Remove unnecessary NULL checksDan Carpenter
These pointers can't be NULL so I have removed the checks. The checking was sort of problematic as well because it didn't make sense. In _nbu2ss_read_request_data() the && should have been ||. In nbu2ss_gad_get_frame() we know that "pgadget" is non-NULL and "udc" is an offset from "pgadget" so it can't be NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: vc04_services: Remove dead FRAGMENTS_TEric Anholt
It's not used in-tree, or in the downstream tree. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: rtl8188eu: replace NULL comparison with variableSantha Meena Ramamoorthy
Replace NULL comparison of the variable with the variable name or !variable to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: rtl8188eu: place constant on the right side of testSantha Meena Ramamoorthy
Place constants on the right side of the test during comparisons to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: rtl8723bs: Replace memset with eth_zero_addrArushi Singhal
Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Coccinelle was used to do the replacement and add the header file linux/etherdevice.h if not already present. The Coccinelle semantic patch that makes this change is as follows: @header@ @@ #include <linux/etherdevice.h> @r1@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); @includeheader depends on r1 && !header@ @@ + #include <linux/etherdevice.h> #include <...> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: rtl8723bs: Remove unnecessary semicolon.Arushi Singhal
Remove unnecessary semicolon using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: rtl8192e: Add spaces around operators.Dafna Hirschfeld
Add spaces around arithmetic and bitwise operators to improve readability of the code. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: rtl8192e: Remove unnecessary parenthesesDafna Hirschfeld
Remove unnecessary parentheses between 'address-of' operators and a struct members. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: rtl8192e: Fix issues regarding blank linesDafna Hirschfeld
Fix multiple blank lines and blank lines after braces. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>