summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-23staging: speakup: remove space after a castSantha Meena Ramamoorthy
Remove blank space after a cast to conform to Linux kernel coding style. Problem found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23staging: speakup: match alignment with open parenthesisSantha Meena Ramamoorthy
Match alignment with open parenthesis to conform to Linux kernel coding style. Problem found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23staging: speakup: add spaces around arithmetic operatorsSantha Meena Ramamoorthy
Add space around arithmetic operators ('+', '-' and '*') to conform to Linux kernel coding style. Problem found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23Staging: gdm724x: LTE: Refactor gdm_lte_pdn_table().Quytelda Kahja
Mostly this change just reverses the primary conditional so most of the code can be pulled back a tab, which fixes some code style warnings. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23Staging: gdm724x: Simplify the struct gdm_endian to a variable.Quytelda Kahja
Since the testing for host endianness and in-driver conversion were removed in 77e8a50149a2, the gdm_endian struct contains only one member, and can therefore be simplified to a single u8 variable. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23Staging: gdm724x: LTE: Fix trailing open parentheses.Quytelda Kahja
Fix lines with a trailing open parenthesis, which is a coding style issue. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: fsl-mc: Move irqchip code out of stagingBogdan Purcareata
Now that the fsl-mc bus core infrastructure is out of staging, the remaining irqchip glue code used (irq-gic-v3-its-fsl-mc-msi.c) goes to drivers/irqchip. Create new Kconfig option for irqchip code that depends on FSL_MC_BUS and ARM_GIC_V3_ITS. This ensures irqchip code only gets built on ARM64 platforms. We can now remove #ifdef GENERIC_MSI_DOMAIN_OPS as it was only needed for x86. Signed-off-by: Stuart Yoder <stuyoder@gmail.com> [rebased, add dpaa2_eth and dpio #include updates] Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> [rebased, split irqchip to separate patch] Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> [add Kconfig dependency on ARM_GIC_V3_ITS] Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: fsl-mc: Move core bus out of stagingBogdan Purcareata
Move the source files out of staging into their final locations: -mc.h include file in drivers/staging/fsl-mc/include go to include/linux/fsl -source files in drivers/staging/fsl-mc/bus go to drivers/bus/fsl-mc -overview.rst, providing an overview of DPAA2, goes to Documentation/networking/dpaa2/overview.rst Update or delete other remaining staging files -- Makefile, Kconfig, TODO. Update dpaa2_eth and dpio staging drivers. Add integration bits for the documentation build system. Signed-off-by: Stuart Yoder <stuyoder@gmail.com> [rebased, add dpaa2_eth and dpio #include updates] Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> [rebased, split irqchip to separate patch] Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: wilc1000: rename _WPARxGtk_end_case_ label 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-02-22staging: wilc1000: rename _WPAPtk_end_case_ label 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-02-22staging: wilc1000: rename pstrStationParam 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-02-22staging: wilc1000: rename pstrDelStaParam 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-02-22staging: wilc1000: rename strDisconnectNotifInfo 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-02-22staging: wilc1000: rename pstrStatistics to avoid camelCaseAjay Singh
Fix "Avoid caseCase" 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-02-22staging: wilc1000: rename pstrSetBeaconParam 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-02-22staging: wilc1000: rename Handle_SetMulticastFilter 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-02-22staging: wilc1000: rename pu32InactiveTime 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-02-22staging: wilc1000: rename variables using camelCase in handle_rcvd_ntwrk_info()Ajay 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-02-22staging: wilc1000: rename ptstrJoinBssParam 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-02-22staging: wilc1000: rename pu8HdnNtwrksWidVal 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-02-22staging: lustre: selftest: freeing an error pointerDan Carpenter
We should just return directly if memdup_user() fails. The current code tries to free "param" which is an error pointer so it will Oops. Fixes: 2baddf262e98 ("staging: lustre: use memdup_user to allocate memory and copy from user") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: socklnd: simplify ksnc_rx_iov_spaceNeilBrown
ksnc_rx_iov_space is currently a union of two arrays, one of 'struct kvec', the other of 'struct bio_vec'. The 'struct bio_vec' option is never used. The array of kvec is used to read in a packet header, or to read data that needs to be skipped so as to synchronize with a packet boundary. In each case the target memory location is a virtual address, never a page, so 'struct bio_vec' is never needed. When we read into a page, different code steps up a separate array of 'struct bio_vec'. So remove the bio_vec option, and remove the union ksock_rxiovspace.. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: fid: perform sanity checks before commitingNeilBrown
When fid fetches a new range from the server, it commits to it (*output = *out) *before* performing sanity checks. This looks backwards. Don't commit to a value until it has been found to be sane. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: fid: fix up debugfs access to ->lcs_spaceNeilBrown
lcs_space can change while the lock is not held if an RPC in underway. This can be detected by seq->ls_update being set. In this case, reading or writing the value should return -EBUSY. Also, the D_INFO CDEBUG() which reports the lcs_space being updated never fires, as it tests the wrong value - ldebugfs_fid_write_common() returns 'count' on success. Finally, this return value should be returned from ldebugfs_fid_space_seq_write(), rather than always returning 'count', so that errors can be detected. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: fid: remove seq_fid_alloc_fini() and simplifyNeilBrown
seq_fid_alloc_fini() is tiny and only called from two places in the one function. We can move both those calls earlier and merge them so only one call is needed. At that point, there is no value added by having a separate function. Also instead of using ++ and -- on ->lcs_update to toggle between 0 and 1, explicitly set to 0 or 1 as appropriate. Moving the locking earlier means that the code which updates seq->lcs_fid is now protected, so ldebugfs_fid_fid_seq_show() now cannot see a torn value. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: fid: use wait_event_cmd()NeilBrown
Rather than open-coding a wait event loop twice, use wait_event_cmd() to wait, dropping the spinlock over schedule(). This does require duplicating part of the wait condition, but that is just three tests on values that are in registers or in cache, so the cost is small and the increased readability is large. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: fid: convert lcs_mutex to a spinlockNeilBrown
There is only one place where this lock is held while the task might sleep - in ldebugfs_fid_space_seq_write() while ldebugfs_fid_write_common() is called. This call can easily be taken out of the locked region by asking it to parse the user data into a local variable, and then copying that variable into ->lcs_space while holding the lock. Note that ldebugfs_gid_write_common returns >0 on success, so use that to gate updating ->lcs_space. So make that change, and convert lcs_mutex to a spinlock named lcs_lock. spinlocks are slightly cheaper than mutexes and using one makes is clear that the lock is only held for a short time. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: ptlrpc: list_for_each improvements.NeilBrown
1/ use list_for_each_entry_safe() instead of list_for_each_safe() and similar. 2/ use list_first_entry() and list_last_entry() where appropriate. 3/ When removing everything from a list, use while ((x = list_first_entry_or_null()) { as it makes the intent clear 4/ No need to take a spinlock in a structure that is about to be freed - we must have exclusive access at this stage. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: fix assorted checkpatch errorsNeilBrown
Possibly the most interesting is the for-loop with no body. Rearranging and initializing end_dirent on each iteration of the outer while, makes the intent clearer. Reviewed-by: "Eremin, Dmitry" <dmitry.eremin@intel.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: remove phantom struct cfs_crypto_hash_descNeilBrown
There is no "struct cfs_crypto_hash_desc" structure. There are only pointers to this structure, which are cast back and forth to struct ahash_request. So discard cfs_crypto_hash_desc, and just use ahash_request directly. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: discard libcfs_kvzalloc and linux-mem.cNeilBrown
The only interesting difference between libcfs_kvzalloc() and kvzalloc() is that the former appears to work with GFP_NOFS, which the latter gives a WARN_ON_ONCE() when that is attempted. Each libcfs_kvzalloc() should really be analysed and either converted to a kzalloc() call if the size is never more than a page, or to use GFP_KERNEL if no locks are held. If there is ever a case where locks are held and a large allocation is needed, then some other technique should be used. It might be nice to not always blindly zero pages too... For now, just convert libcfs_kvzalloc() calls to kvzalloc(), and let the warning remind us that there is work to do. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: improve some libcfs_kvzalloc calls.NeilBrown
Using vmalloc with GFP_NOFS is not supported as vmalloc performs some internal allocations with GFP_KERNEL. So in cases where the size passed to libcfs_kvzalloc() is clearly at most 1 page, convert to kzalloc(). In cases where the call clearly doesn't hold any filesystem locks, convert to GFP_KERNEL. Unfortunately there are many more that are not easy to fix. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: discard lu_buf allocation library.NeilBrown
This library code is unnecessarily generic, but also not generic enough. Library code that performs allocations should always take a gfp_flags argument. So discard the library and in the one file where it is used, just use kzalloc or krealloc as needed. In this context, it is clear that vmalloc is never needed. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: discard libcfs_kvzalloc_cpt()NeilBrown
This function is used precisely once, and is sufficiently trivial that it may as well be open-coded. Doing so helpfully highlights the similarity between the new kvzalloc_node() call and the already existing kzalloc_node() call in the same function. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: make signal-blocking functions inlineNeilBrown
cfs_block_sigsinv() and cfs_restore_sigs() are now simple enough to inline them. This means we can discard linux-prim.c Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: improve API and implementation of blocking signals.NeilBrown
According to comment for set_current_blocked() in kernel/signal.c, changing ->blocked directly is wrong. sigprocmask() should be called instead. So change cfs_block_sigsinv() and cfs_restore_sigs() to use sigprocmask(). For consistency, change them to pass the sigset_t by reference rather than by value. Also fix cfs_block_sigsinv() so that it correctly blocks signals above 32 on a 32bit host. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: simplify linux-prim.cNeilBrown
cfs_block_sigs() is never used. cfs_clear_sigpending() is never used. cfs_block_allsigs() is no longer used. So those three functions can go. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: lnet: remove cfs_block_allsigs calls.NeilBrown
Both places that cfs_block_allsigs() is used here, the goal is to turn an interruptible wait into an uninterruptible way. So instead of blocking the signals, change TASK_INTERRUPTIBLE to TASK_NOLOAD. In each case, no other functions called while signals are blocked will sleep - just the one that has been fixed. In one case, an extra 'interruptible' flag needs to be passed down so the waiting decision can be made at the right place. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: remove unnecessary cfs_block_allsigs() callsNeilBrown
Threads started by kthread_run() ignore all signals, as kthreadd() calls ignore_signals(), and this is inherited by all children. So there is no need to call cfs_block_allsigs() in functions that are only run from kthread_run(). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: remove linux-curproc.cNeilBrown
The only functionality remaining here is cfs_curproc_cap_pack(), and it can be trivially implemented as an inline in curproc.h. So do that and remove the file. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: opencode cfs_cap_{raise, lower, raised}NeilBrown
Each of these functions is used precisely once, so having a separate exported function seems like overkill. cfs_cap_raised() is trivial - one line. cfs_cap_raise() and cfs_cap_lower() are used as a pair which is more effectively implemented with override_cred() / revert_creds(). Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: lustre: replace all CFS_CAP_* macros with CAP_*NeilBrown
Lustre defines a few CFS_CAP_* macros which are exactly the same as the corresponding CAP_* macro, with one exception. CFS_CAP_SYS_BOOT is 23 CAP_SYS_BOOT is 22. CFS_CAP_SYS_BOOT is only used through CFS_CAP_FS_MASK and causes capability 23 (CAP_SYS_NICE) to be dropped in certain circumstances. It is probable that the intention was to drop CAP_SYS_BOOT, and this is what is now done. CFS_CAP_CHOWN_MASK and CFS_CAP_SYS_RESOURCE_MASK are never used, so they have been removed. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: rtl8188eu: Remove unneeded castChristopher Diaz Riveros
Fix Coccinelle alert: drivers/staging//rtl8188eu/os_dep/usb_intf.c:336:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: emxx_udc: Remove unneeded castChristopher Diaz Riveros
Fix Coccinelle alert: drivers/staging//emxx_udc/emxx_udc.c:2689:19-21: WARNING: casting value returned by memory allocation function to (u8 *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: rtl8723bs: Remove unneeded castChristopher Diaz Riveros
Fix Coccinelle alert: drivers/staging//rtl8723bs/os_dep/sdio_intf.c:340:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22staging: net: netlogic: Remove unneeded castChristopher Diaz Riveros
Fix Coccinelle alert: drivers/staging//netlogic/xlr_net.c:996:12-30: WARNING: casting value returned by memory allocation function to (struct xlr_adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c.Quytelda Kahja
Fix a coding style problem. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22Staging: ks7010: hostif: Convert the ps_confirm_wait_inc() macro to a real ↵Quytelda Kahja
function. Convert the unsafe macro into an inline function. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22Staging: ks7010: hostif: Convert SME queue macros to real functions.Quytelda Kahja
Convert the unsafe macros into inline functions. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22Staging: ks7010: sdio: Convert RX/TX queue macros into real functions.Quytelda Kahja
Convert the unsafe macros into inline functions. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>