aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-08-14staging: lustre: checkpatch: argument alignment for readabilitySwee Hua Law1-4/+2
Fix checkpatch problem: move last argument of the hlist..() back to same line Signed-off-by: Swee Hua Law <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: lustre: checkpatch: move */ block comment to next lineSwee Hua Law1-1/+2
Fix checkpatch problem: move */ from end of line to new line Signed-off-by: Swee Hua Law <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: lustre: checkpatch: symbol == NULL should be !symbolSwee Hua Law1-2/+2
Fix checkpatch problem: change == NULL comparison to !symbol Signed-off-by: Swee Hua Law <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: lustre: checkpatch: do not init global to NULLSwee Hua Law1-2/+2
Fix checkpatch problem: remove NULL assignment fro global variable Signed-off-by: Swee Hua Law <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: lustre-libcfs: make static-variable constantPatrick Boettcher1-2/+2
This static can be made constant as it is never modified. Found during sparse-cleanup. Signed-off-by: Patrick Boettcher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: lustre-libcfs: fix sparse warningPatrick Boettcher3-12/+14
Fix sparse warnings of the following type: warning: symbol '....' was not declared. Should it be static? Signed-off-by: Patrick Boettcher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14Staging: unisys: Remove useless cast on void pointerShraddha Barke1-1/+1
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Shraddha Barke <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14Staging: lustre: libcfs: Remove unnecessary cast on void*Shraddha Barke1-1/+1
This patch does away with the cast on void * as it is unnecessary. Semantic patch used is as follows: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (void *) e ) Signed-off-by: Shraddha Barke <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14Staging: wilc1000: Remove null check before kfreeShraddha Barke1-2/+1
kfree on NULL pointer is a no-op. This patch uses the following semantic patch to find such an instance where NULL check is present before kfree. // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl>smpl> Signed-off-by: Shraddha Barke <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: rtl8723au: Fix Sparse errors in rtw_security.cJacob Kiefer1-10/+14
This patch fixes the following sparse errors: CHECK drivers/staging/rtl8723au/core/rtw_security.c drivers/staging/rtl8723au/core/rtw_security.c:189:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:189:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:189:39: \ got restricted __le32 [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:197:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:197:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:197:39: \ got restricted __le32 [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:682:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:682:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:682:39: \ got restricted __le32 [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:694:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:694:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:694:39: \ got restricted __le32 [usertype] <noident> Signed-off-by: Jacob Kiefer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: remove wilc_strutils.c and wilc_strutils.hChaehyun Lim5-40/+1
Remove wilc_strutils.c and wilc_strutils.h that are not needed. wilc_strutils.o is also removed in Makefile. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: remove WILC_memcpy_INTERNALChaehyun Lim2-20/+0
Remove WILC_memcpy_INTERNAL that is used in the WILC_memcpy because WILC_memcpy is replaced by memcpy. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: remove WILC_memcpy functionChaehyun Lim1-30/+0
Remove WILC_memcpy function that is changed to memcpy. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: use memcpy instead of WILC_memcpyChaehyun Lim5-140/+140
Use memcpy instead of WILC_memcpy that is a custom function. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: remove WILC_strncmp functionChaehyun Lim2-41/+0
Remove WILC_strncmp function that is changed to strncmp. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: use strncmp instead of WILC_strncmpChaehyun Lim1-1/+1
Use strncmp instead of WILC_strncmp. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: remove WILC_strncpy functionChaehyun Lim2-24/+0
Remove WILC_strncpy function that is changed to strncpy. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: Use strncpy instead of WILC_strncpyChaehyun Lim1-1/+1
Use strncpy instead of WILC_strncpy that is a custom function Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: remove WILC_strlen functionChaehyun Lim2-19/+0
Remove WILC_strlen function that is changed to strlen. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: use strlen instead of WILC_strlenChaehyun Lim1-2/+2
Use strlen instead of WILC_strlen that is a custom function. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: wilc1000: remove commented codeChaehyun Lim2-3/+0
Remove commented code that is not used. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: me4000: use bitwise AND instead of logicalDan Carpenter1-2/+2
This was supposed to bitwise AND but there is a typo. Fixes: 1a02387063fb ('staging: comedi: me4000: remove 'board' from me4000_ai_insn_read()') Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: adl_pci7x3x: fix digital output on PCI-7230Ian Abbott1-2/+14
The "adl_pci7x3x" driver replaced the "adl_pci7230" and "adl_pci7432" drivers in commits 8f567c373c4b ("staging: comedi: new adl_pci7x3x driver") and 657f77d173d3 ("staging: comedi: remove adl_pci7230 and adl_pci7432 drivers"). Although the new driver code agrees with the user manuals for the respective boards, digital outputs stopped working on the PCI-7230. This has 16 digital output channels and the previous adl_pci7230 driver shifted the 16 bit output state left by 16 bits before writing to the hardware register. The new adl_pci7x3x driver doesn't do that. Fix it in `adl_pci7x3x_do_insn_bits()` by checking for the special case of the subdevice having only 16 channels and duplicating the 16 bit output state into both halves of the 32-bit register. That should work both for what the board actually does and for what the user manual says it should do. Fixes: 8f567c373c4b ("staging: comedi: new adl_pci7x3x driver") Signed-off-by: Ian Abbott <[email protected]> Cc: <[email protected]> # 3.13+, needs backporting for 3.7 to 3.12 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: remove "magic" numbers in ↵H Hartley Sweeten1-1/+2
apci3501_read_insn_timer() Use register bit defines from addi_tcw.h to remove the "magic" numbers. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: remove "magic" numbers in ↵H Hartley Sweeten1-4/+4
apci3501_write_insn_timer() Use register bit defines from addi_tcw.h to remove the "magic" numbers. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: remove "magic" numbers in ↵H Hartley Sweeten1-5/+13
apci3501_config_insn_timer() Use register bit defines from addi_tcw.h to remove the "magic" numbers. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: addi_apci_3501: remove "magic" numbers in apci3501_interrupt()H Hartley Sweeten1-5/+7
Use register bit defines from addi_tcw.h to remove the "magic" numbers. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: addi_apci_3501: use addi_tcw.h for the timer registersH Hartley Sweeten2-27/+23
The APCI3501_TIMER_* register defines in this driver are that same as the ADDI_TCW_* defines with an additional offset. Add a 'tcw' (timer/counter/watchdog) member to the private data to hold the address for the iobase of the registers. Use that and the defines from addi_tcw.h to address the registers. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: addi_apci_3501: rename CamelCase vars in apci3501_interrupt()H Hartley Sweeten1-10/+11
Rename the CamelCase local variables. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: addi_apci_3501: prefer using the BIT macroH Hartley Sweeten1-3/+3
Change the register bit defines to use the BIT macro. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: addi_apci_3501: rename private data 'i_IobaseAmcc'H Hartley Sweeten1-8/+7
Rename this CamelCase member of the private data. Also, fix the type of the member, it holds a pci_resource_start() address and should be an unsigned long. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: refactor apci3501_config_insn_timer()H Hartley Sweeten1-36/+23
The handling for the watchdog and timer modes is very similar. Refactor this function to use a common code path for both modes. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in ↵H Hartley Sweeten1-10/+11
apci3501_config_insn_timer() Rename this CamelCase local variable. For aesthetics, split the mask/set operations. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: refactor apci3501_read_insn_timer()H Hartley Sweeten1-12/+5
The handling of the ADDIDATA_WATCHDOG and ADDIDATA_TIMER is identical. Refactor this function to use a common code path for both timer modes. Remove the incorrect dev_err() noise. The subdevice is valid but the timer_mode is not supported. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: refactor apci3501_write_insn_timer()H Hartley Sweeten1-35/+13
The handling of the ADDIDATA_WATCHDOG and ADDIDATA_TIMER is identical except for the "stop" operation. Refactor this function to use a common code path for both timer modes. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in ↵H Hartley Sweeten1-18/+20
apci3501_write_insn_timer() Rename this CamelCase local variable. For aesthetics, split the mask/set operations. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: addi_apci_3501: rename private data 'b_TimerSelectMode'H Hartley Sweeten2-9/+9
Rename this CamelCase member of the private data. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci3501: remove useless read/mask to stop watchdogH Hartley Sweeten1-2/+0
The watchdog is stopped in apci3501_write_insn_timer() by writing a 0 to the timer control register. There is no need to read the register first and mask it (as done when the timer is used as a timer). Reported-by: coverity (CID 1227052) Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: comedi_fops: absorb comedi_free_board_minor()H Hartley Sweeten1-8/+5
This function is only called by comedi_cleanup_board_minors() and the 'minor' parameter will always be < COMEDI_NUM_BOARD_MINORS. For aesthetics, absorb the function and remove the unnecessary BUG_ON(). Split the comedi_clear_board_minor() out to clarify that the return value is a comedi_device pointer. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: comedi_fops: remove BUG_ON() in ↵H Hartley Sweeten1-1/+0
comedi_dev_get_from_board_minor() This function is only called by comedi_dev_get_from_minor() and the 'minor' value will always be < COMEDI_NUM_BOARD_MINORS. Remove the unnecessary BUG_ON(). Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: comedi_fops: remove BUG_ON() in comedi_free_subdevice_minor()H Hartley Sweeten1-4/+2
Drivers should not crash the kernel. This function is only called by comedi_device_detach_cleanup() and the s->minor will always be valid or the device wouldn't have attached in the first place. Leave the checks for safety in accessing the comedi_subdevice_minor_table array but remove the BUG_ON() calls. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: comedi_fops: remove BUG_ON() in comedi_cleanup()H Hartley Sweeten1-7/+0
The BUG_ON() checks in this function are not necessary. comedi_cleanup_board_minors() clears all the entries in the comedi_board_minor_table array and will call comedi_device_cleanup() for all attached devices. comedi_device_cleanup() will then clear the entries in the comedi_subdevice_minor_table array with comedi_free_subdevice_minor(). Remove the BUG_ON(), drivers should not crash the kernel. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: comedi_fops: remove remaining BUG_ON() checksH Hartley Sweeten1-2/+0
The BUG_ON() checks in comedi_subdevice_from_minor() and comedi_dev_get_from_subdevice_minor() are not necessary. The 'minor' numbers for a given comedi driver are setup by comedi_dev_get_from_subdevice_minor() and will always be in the correct range. Drivers should not crash the kernel, remove the BUG_ON() checks. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci1564: remove magic numbers in ↵H Hartley Sweeten2-4/+5
apci1564_counter_insn_read() Use the bit defines from addi_tcw.h to remove the magic numbers in this function. Add the missing define for ADDI_TCW_STATUS_HARDWARE_TRIG. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci1564: tidy up apci1564_counter_insn_write()H Hartley Sweeten1-2/+1
Clear the gate and trig bits in the common code path. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci1564: fix counter "mode" settingH Hartley Sweeten1-1/+1
According to the (broken) original driver, data[4] passed to this function is the "timer mode". It appears the original code used the wrong shift to set the bits. Use the ADDI_TCW_CTRL_MODE() macro so that the correct bits get set. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci1564: remove useless code in ↵H Hartley Sweeten1-6/+5
apci1564_counter_insn_config() The gate, trig, and ena, bits in the 'ctrl' are cleared at the start of the function. There is no reason clear these bits for each step. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci1564: remove magic number in ↵H Hartley Sweeten1-1/+2
apci1564_timer_insn_read() Use the bit define from addi_tcw.h to remove the magic number. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci1564: tidy up apci1564_timer_insn_write()H Hartley Sweeten1-3/+2
Clear the gate and trig bits in the common code path. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: comedi: hwdrv_apci1564: use addi_tcw.h definesH Hartley Sweeten2-35/+45
Use the ADDI_TCW_CTRL_REG bit defines in addi_tcw.h to remove the "magic" numbers. Add some missing bit defines and mask defines to addi_tcw.h to help cleanup the code. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>