aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-28staging: wilc1000: removes unused dead codesLeo Kim1-8/+0
This patch removes unused dead codes that define custom feature. Signed-off-by: Leo Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: wilc1000: replaces frame_type with type of struct frame_regLeo Kim3-7/+7
This patch replaces frame_type with type of struct frame_reg. Signed-off-by: Leo Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: wilc1000: replaces g_struct_frame_reg with frame_regLeo Kim3-11/+11
This patch replaces g_struct_frame_reg with frame_reg. Signed-off-by: Leo Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: wilc1000: removes typedef of struct struct_frame_regLeo Kim1-4/+3
This patch removes typedef of struct struct_frame_reg. Renames the struct_frame_reg to frame_reg as well. Signed-off-by: Leo Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: wilc1000: wilc_frame_register: removes unused hif_drvLeo Kim1-6/+0
This patch removes unused hif_drv of wilc_frame_register function. It's perform an unnecessary null check and debug print log. Signed-off-by: Leo Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: wilc1000: removes WIRELESS_EXTLeo Kim1-1/+0
This patch removes WIRELESS_EXT. Does not used the WIRELESS_EXT define. Signed-off-by: Leo Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: wilc1000: use completion instead of struct semaphore hif_sema_driverChaehyun Lim1-5/+5
struct semaphore hif_sema_driver is used to signal completion of host interface message. This patch replaces struct semaphore hif_sema_driver with struct completion hif_driver_comp. It is better to use completion than semaphore for this case. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: wilc1000: use completion instead of struct semaphore hif_sema_threadChaehyun Lim1-4/+4
struct semaphore hif_sema_thread is used to signal completion of host interface thread. This patch replaces struct semaphore hif_sema_thread with struct completion hif_thread_comp. It is better to use completion than semaphore for this case. Signed-off-by: Chaehyun Lim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: unisys: include: changed 'v' variable to 'state'Alexander Curtin1-2/+2
The argument for ULTRA_CHANNELCLI_STRING is supposed to be an integer representing the channel state. 'state' is a more descriptive variable name for this. Signed-off-by: Alexander Curtin <[email protected]> Signed-off-by: David Kershner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: unisys: visorbus: replaced use of vague 'x' variableAlexander Curtin1-32/+33
In client_bus_info_show, the variable 'x' is used to create keep track of the offset that the current 'pos' in the output buffer needs to be incremented by. Since 'off' is already taken 'shift' was used since it's used to shift the pointer. Signed-off-by: Alexander Curtin <[email protected]> Signed-off-by: David Kershner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: unisys: visorbus: replaced vague 'p' variable with 'pos'Alexander Curtin1-9/+9
In the case of client_bus_info_show, the variable 'p' was used to indicate the position in the output buffer. This was changed to 'pos' to indicate that it kept track of the current position in the output buffer. Signed-off-by: Alexander Curtin <[email protected]> Signed-off-by: David Kershner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: unisys: visorbus: replaced vague variable name in zoneguid_showAlexander Curtin1-2/+2
The variable name "s" doesn't indicate the purpose of the string, which is to store the id collected from the visorchannel_zoneid function. This just replaces the name with "zoneid". Signed-off-by: Alexander Curtin <[email protected]> Signed-off-by: David Kershner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: unisys: visorbus: replaced vague variable name in typeguid_showAlexander Curtin1-2/+2
The variable name "s" doesn't indicate the purpose of the string, which is to store the id collected from the visorchannel_id function. This just replaces the name with "typeid". Signed-off-by: Alexander Curtin <[email protected]> Signed-off-by: David Kershner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: unisys: remove visorinput.c double negative comparisonErik Arfvidson1-1/+1
This patch simply removes the double negative comparison for test_bit since test_bit already preforms this check. Signed-off-by: Erik Arfvidson <[email protected]> Signed-off-by: David Kershner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: unisys: remove channel.h double negative comparisonErik Arfvidson1-3/+3
This patch removes the double negative comparisons for function readb. Signed-off-by: Erik Arfvidson <[email protected]> Signed-off-by: David Kershner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: return size_t for libcfs_ioctl_packlenJames Simmons1-2/+2
Change return value to size_t. Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: use BIT macro in linux-module.cJames Simmons1-3/+3
Use the proper BIT macro for libcfs_ioctl_is_invalid(). Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: return proper bool valuesJames Simmons1-13/+13
Return real bool values for libcfs_ioctl_is_invalid(). Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: add uapi headers to libcfs_ioctl.hJames Simmons1-0/+3
Need a few uapi headers to make libcfs_ioctl.h compilable in userland. Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: make libcfs_ioctl.h readableJames Simmons1-28/+29
Fix up all thw whitescapes and line up the IOCTL defines so it is readable. Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: move function declarations from libcfs_ioctl.hJames Simmons2-4/+3
Move the function declartions that are used only by kernel space to libcfs.h This makes libcfs_ioctl.h a offical uapi header now. Move large inline functions out of libcfs_ioctl.h to the source file linux-module.c belonging to libcfs. This code is only used by the core of libcfs and such inline functions don't belong in a uapi header file. Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: migrate inline functions to source fileJames Simmons2-65/+65
Move large inline functions out of libcfs_ioctl.h to the source file linux-module.c belonging to libcfs. This code is only used by the core of libcfs and such inline functions don't belong in a uapi header file. Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: removal all userland only macros from libcfs_ioctl.hJames Simmons1-9/+0
All the macros in libcfs_ioctl.h that is needed by user land have been moved into the lustre utilities software stack. Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging:lustre: remove libcfs pseudo device abstractionParinay Kondekar3-31/+3
With the libcfs ioctl cleanup we no longer need the libcfs pseudo device abstraction. Signed-off-by: Parinay Kondekar <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging:lustre: call libcfs_ioctl directlyParinay Kondekar3-13/+8
No reason to go through the cfs_psdev_ops abstract to call libcfs_ioctl. Just call libcfs_ioctl directly. Signed-off-by: Parinay Kondekar <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging:lustre: remove libcfs_psdev_[open|release]Parinay Kondekar3-49/+1
With struct libcfs_device_userstate gone we can remove the remaining code of libcfs_psdev_ops.p_[open|close] as well as the libcfs_psdev_[open|release] functions. Signed-off-by: Parinay Kondekar <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging:lustre: remove the IOC_LIBCFS_MEMHOG ioctlParinay Kondekar1-1/+1
The IOC_LIBCFS_MEMHOG is not needed so remove the last bits. Signed-off-by: Parinay Kondekar <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging:lustre: remove last bits of the IOC_LIBCFS_PANIC ioctlParinay Kondekar3-14/+2
A few pieces still exist for the IOC_LIBCFS_PANIC ioctl. Remove these last bits to prevent old tools from using them. The latest lustre utilities no longer use this ioctl. Signed-off-by: Parinay Kondekar <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: remove libcfs_ioctl_popdata wrapperJohn L. Hammond3-11/+4
Lets just use copy_to_user() directly instead of having a wrapper function. Signed-off-by: John L. Hammond <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/14180 Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: frank zago <[email protected]> Reviewed-by: James Simmons <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: move libcfs_ioctl_handler stuff to libcfs.hJohn L. Hammond2-13/+14
Move all the libcfs_ioctl_handler code from libcfs_ioctl.h to libcfs.h. The header libcfs_ioctl.h is a uapi header so their is no reason to keep kernel internals in that header. Signed-off-by: John L. Hammond <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/14180 Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: frank zago <[email protected]> Reviewed-by: James Simmons <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: remove libcfsutil.h in commentJohn L. Hammond1-1/+1
The header libcfsutil.h has been long gone in the upstream client. Replace libcfsutil.h reference to the current user land header instead. Signed-off-by: John L. Hammond <[email protected]> Signed-off-by: James Simmons <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/14180 Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: frank zago <[email protected]> Reviewed-by: James Simmons <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: change variable nameJames Simmons1-3/+3
Change arg to uparam name for libcfs_ioctl(). Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: simple cleanup in obd_ioctl_popdataLiang Zhen1-3/+1
Code simplification for obd_ioctl_popdata. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: lnet: make sure lnet data not greater than LIBCFS_IOC_DATA_MAXLiang Zhen1-0/+4
Fail to compile if largest LNet user land data structures passed to kernel are larger than LIBCFS_IOC_DATA_MAX Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: test if userland data is to smallLiang Zhen1-0/+5
Ensure that user land data is at least the smallest size. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: update error messages in linux-module.cLiang Zhen1-2/+2
The error message are for libcfs layer not LNet. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: invert test condition for libcfs_ioctlLiang Zhen1-6/+7
Invert the test of error returned by the handle_ioctl pointer. This reduces the code by one indentation level. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: test if data is NULLLiang Zhen1-1/+1
Make sure data is not NULL otherwise we get an oops when using the IOC_LIBCFS_MARK_DEBUG ioctl. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: move comment in libcfs_ioctlLiang Zhen1-6/+6
Move the comment about libcfs_ioctl_data_adjust to the section where libcfs_ioctl_data_adjust is actually called. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: add debugging info for libcfs_ioctlLiang Zhen1-1/+5
Added some lustre debugging to track down potential future bugs. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: merge libcfs_ioctl_handle into libcfs_ioctlLiang Zhen1-22/+15
This is apart of the cleanup of libcfs_ioctl* code. In this part we turn libcfs_ioctl_handle into libcfs_ioctl since libcfs_ioctl is now a skeleton function. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: merge code from libcfs_ioctl into libcfs_ioctl_getdataLiang Zhen3-32/+23
This is apart of the cleanup of libcfs_ioctl* code. In this part some of the code in libcfs_ioctl is migrated into libcfs_ioctl_getdata_len() which is renamed libcfs_ioctl_getdata() Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: use break in switch options for libcfs_ioctl_handleLiang Zhen1-5/+4
Instead of just returning for each switch condition use a break. Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: libcfs: replace LNET_MAX_IOCTL_BUF_LEN with something biggerLiang Zhen2-4/+4
The size of LNET_MAX_IOCTL_BUF_LEN restricts the size of libcfs ioctl to the maximum needs of the LNet layer. Since libcfs also handles things like debugging we might need to let user land pass more data to or from the kernel than what is possible Signed-off-by: Liang Zhen <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Johann Lombardi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: lustre: lnet: revert commit 4671a0266James Simmons1-3/+11
Commit 4671a0266 change the parameter of the second parameter of cfs_precpt_alloc() from a sizeof type to sizeof type *pointer. This was incorrect in this case and it caused a crash when the LNet layer was brought up in my testing. The reason is cfs_precpt_alloc() creates an array of items where the arrays size is equal to the number of CPTs that exist. Changing to type *pointer only had cfs_precpt_alloc() create an array of pointers instead of an array of actual data structures. This patch reverse this change and adds comments to explain what cfs_precpt_alloc() is actually doing to avoid potential issues like this again. Changelog: v1) Simple revert of the original patch v2) Added in comments to explain why cfs_precpt_alloc() has the arguments it uses. Signed-off-by: James Simmons <[email protected]> Cc: Sandhya Bankar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: media: omap1: Replace request_irq with devm_request_irqAmitoj Kaur Chawla1-6/+3
Replace request_irq with devm_request_irq to get the interrupt for device which is automatically freed on exit. Remove corresponding free_irq from probe and remove functions of a platform device. Also, remove an unnecessary label. Signed-off-by: Amitoj Kaur Chawla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: media: omap1: Switch to devm_ioremap_resourceAmitoj Kaur Chawla1-25/+6
Replace calls to request_mem_region and ioremap with a direct call to devm_ioremap_resource instead and modify error handling. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. Also remove unnecessary labels, variable initialisations and release_mem_region iounmap from probe and remove functions. Signed-off-by: Amitoj Kaur Chawla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: media: omap1: Replace kzalloc with devm_kzallocAmitoj Kaur Chawla1-12/+5
Replace kzalloc with devm_kzalloc and consequently remove kfrees in probe and remove functions of a platform device. As a result of this change, remove unnecessary out of memory message and an unnecessary label. Signed-off-by: Amitoj Kaur Chawla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: media: omap1: Replace clk_get with devm_clk_getAmitoj Kaur Chawla1-11/+4
devm_clk_get allocated resources get released when a driver detaches. Replace clk_get with devm_clk_get and remove corresponding data releasing function clk_put from probe and remove functions of a platform device. Also remove an unnecessary label. This change was made with the help of the following Coccinelle semantic patch: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - clk_get + devm_clk_get (...); ... ?- clk_put(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- clk_put(...); ... } Signed-off-by: Amitoj Kaur Chawla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: rtl8188eu: os_dep: ioctl_linux: Clean up tests if NULL returned on ↵Bhaktipriya Shridhar1-4/+4
failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>