aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorhba (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-05-09staging: unisys: visorhba: fail gracefully for thread creation failuresTim Sell1-26/+28
Previously, if visorhba ever failed to create its thread, it would have subsequently attempted to do a kthread_stop() on an invalid task_struct pointer. This was fixed via the new visor_thread_stop() function, which validates the task_struct pointer before doing the kthread_stop(). Also, the other thread-related fields in visor_thread_info (has_stopped and id) were not being used, so visor_thead_info was just removed. We also now spit out an error message if thread creation fails. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: unisys: visorhba: replace functionlike macro with functionAlexander Curtin1-4/+22
The `set_no_disk_inquiry_request` function now uses the correct min macro. Also I removed an unnecessary conditional. Get rid of u8 casts, u32 len, and u32 lun (which is actually defined as a u64 in the scsidev->lun field from whence it originated). Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: unisys: Modify boolean assignmentJanani Ravichandran1-1/+1
Boolean variables should be assigned true/false rather than 1/0. This patch makes a correction on such a variable which has boolean values assigned in all other places within the file. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: unisys: Remove parentheses around right hand side of assignmentJanani Ravichandran1-2/+2
Remove parentheses on the right hand side of assignment as they are not needed. Semantic patch used: @@ expression a, b, c, d; @@ ( a = (c == d) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07Staging: unisys: fix potential format string leakKees Cook1-1/+1
Since "name" is always used directly, force "%s" for the kthread format string to avoid any potential format string leaks. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-17staging: unisys: return error value directlySudip Mukherjee1-8/+4
In case of error we are jumping to err_del_scsipending_ent and always returning SCSI_MLQUEUE_DEVICE_BUSY from error path. We donot need a variable to return a fixed error value, it can be returned directly. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-17staging: unisys: remove unused variableSudip Mukherjee1-4/+0
The variables op, sd and zmotion were never being used. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: unisys: Remove unnecessary cast on void pointerShraddha Barke1-3/+3
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 <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: unisys: Add s-Par visorhbaDavid Kershner3-0/+1265
This driver create a host bus adapter device when s-Par sends a device create message to create a storage adapter on the visorbus. When the message is received by visorbus, the visorhba_probe function is called and the hba device is created and managed by the visorhba driver. Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>