summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/ipath
Commit message (Collapse)AuthorAgeFilesLines
* staging: ipath: ipath_init_chip: Use setup_timerMuhammad Falak R Wani2015-10-251-11/+7Star
| | | | | | | | | | | | | | | | | | | | | Use of the timer API function setup_timer instead of init_timer, removing the structure field assignments, and make the codeflow more readable. The simplified sematic patch used is :- <smpl> @timer@ expression e1,e2,e3,fn_ptr; @@ -init_timer(&e1); +setup_timer(&e1, fn_ptr, e2); ... when != fn_ptr = e3 -e1.function = fn_ptr; -e1.data = e2; </smpl> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ipath: ipath_sdma: Use setup_timerMuhammad Falak R Wani2015-10-251-3/+3
| | | | | | | | Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ipath: ipath_verbs: Use setup_timerMuhammad Falak R Wani2015-10-251-3/+2Star
| | | | | | | | Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ipath: ipath_driver: Use setup_timerMuhammad Falak R Wani2015-10-251-4/+3Star
| | | | | | | | | | | | | | | | | | | | | Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. The simplified semantic patch used is :- <smpl> @timer@ expression e1,e2,e3,fn_ptr; @@ -init_timer(&e1); +setup_timer(&e1, fn_ptr, e2); ... when != fn_ptr = e3 -e1.function = fn_ptr; -e1.data = e2; </smpl> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: IB/ipath: remove sched.h headerGeliang Tang2015-10-258-8/+0Star
| | | | | | | | sched.h header in ipath_*.c is now unnecessary, since I have added sched.h in ipath_kernel.h. So remove it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: IB/ipath: use TASK_COMM_LEN in ipath_portdataGeliang Tang2015-10-251-1/+2
| | | | | | | | Use comm[TASK_COMM_LEN] instead of comm[16] in ipath_kernel.h. And add sched.h header in it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rdma: Replace kmalloc with kmalloc_arrayCristina Moraru2015-10-251-2/+2
| | | | | | | | | Replace kmalloc with specialized function kmalloc_array when the size is a multiplication of: number_of_elements * size_of_element Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rdma: ipath: ipath_eeprom: Remove useless intialisationAmitoj Kaur Chawla2015-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rdma: ipath: ipath_init_chip: Remove useless initialisationAmitoj Kaur Chawla2015-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rdma: ipath: Use kcalloc instead of kzalloc to allocate arrayShraddha Barke2015-10-133-3/+3
| | | | | | | | | The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rdma: Use memdup_userKsenija Stanojevic2015-10-131-10/+3Star
| | | | | | | | | | Use memdup_user when user data is immediately copied into the allocated region. Issue found using coccinelle. Signed-off-by: Ksenija Stanojevic<ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* IB/ipath: use offset_in_page macroGeliang Tang2015-10-041-2/+2
| | | | | | | Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rdma: Fix braces around if/elseMartin Kletzander2015-10-047-36/+30Star
| | | | | | | Get rid of all ELSE_AFTER_BRACE type errors reported by checkpatch.pl. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ipath,qib: Expose max_sge_rd correctlySteve Wise2015-08-291-0/+1
| | | | | | | | | Applications must not assume that max_sge and max_sge_rd are the same, Hence expose max_sge_rd correctly as well. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
* IB/ipath: Deprecate ipath driver and move to staging.Dennis Dalessandro2015-08-2938-0/+30498
It is now time for the ipath driver to begin to be phased out of the kernel. This patch moves the ipath driver from the Infiniband sub tree to the staging area where it will remain until the code is removed from the kernel in a few releases. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>