aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-28staging: unisys: visorbus: visorchipset.c: Remove useless initializationsDavid Kershner1-8/+8
Found several more useless initializations in visorchipset.c get rid of them. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: remove visorbus_type externDavid Kershner4-38/+38
The variable visorbus_type could be contained to the visorbus_main.c file by moving the two functions that referenced it visorchipset.c. This allowed us to remove the incorrect extern from the include file visorbus.h. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: keep the success path on the left sideDavid Kershner1-4/+3
If you can't find the dev, it is an error. Indent for the error, instead of the success. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: include: consolidate a commentDavid Kershner1-4/+3
Use all 80 characters of the line to consolidate a comment. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: include: remove signature_32David Kershner1-3/+2
Remove signature_32 since it was only being referenced in one location. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: include: reorder to avoid forward declarationDavid Kershner1-62/+63
The include file visorbus.h has a forward declaration of visor_device. A simple reorder of the file removed the need for the forward declaration. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: vbuschannel doesn't use ctypesDavid Kershner3-1/+2
Don't include ctypes in vbuschannel.h, it isn't used by ctypes, but it is used by visorbus_main.c so include it there. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: include: remove io.h from channel.hDavid Kershner1-1/+0
Channel.h was including io.h and not using it. Remove the #include. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: only include a file where it is used.David Kershner6-2/+6
The header file visorbus.h included several linux headers that were used by the source files that include it. Move the includes to the files that actually use them. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: to_visor_device/to_visor_driver move upDavid Kershner1-10/+4
The macros to_visor_device and to_visor_driver are fairly small; move them up to the declaration block to save some space. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: visorbus_main.c: remove blank linesDavid Kershner1-41/+3
Removes several extraneous blank lines in visorbus_main.c. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: visorchipset: clean up blank lines in visorchipsetDavid Kershner1-95/+3
Remove extraneous blank lines and get consistency of blank lines. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: fix newlines for visorchannelDavid Kershner1-27/+1
Remove extraneous blank lines and add some lines that are needed. General philosophy -- declaration, space, pre-conditions (if needed), space, then rest of function. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: Remove unneeded initializationDavid Kershner1-1/+1
No need to set drv to NULL. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: simplify debugfs print statmentDavid Kershner1-1/+1
Simplify debugfs statement so it is clearer and more compact. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: clean up formatting of function definitionsDavid Kershner1-18/+9
Consolidate function parameters onto the same line if they can fit. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: shrink the name of a variableDavid Kershner2-12/+10
The field debugfs_client_bus_info can be reduced to debugfs_bus_info. The word client is extraneous in this context. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: keep the success path on the leftDavid Kershner1-7/+9
The code was indenting for the successful path and then combining the error and success path for the rest of the function. Correct it so the success path is not indented. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: clean up initializationsDavid Kershner1-7/+7
Don't compute value of offset during initialization. Assigning a value to offset should happen after we have verified all of its components. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys; visorbus: visorbus_main.c: remove extraneous newlineDavid Kershner1-8/+4
Use all 80 characters when calling functions. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: fix up device_destroyDavid Kershner1-2/+3
Visorbus_remove_instance calls device_unregister which in turn will call visorbus_release_busdevice. The function visorbus_release_busdevice was freeing the visor_device. The code in visorbus_remove_instance was then trying to reference the visor_device. This patch cleans up the code so the visor_device is not referenced after the unregister. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: NULL pending_msg_hdr not an errorDavid Kershner2-8/+8
A NULL pending_msg_hdr is not an error, it just means that the firmware does not want an error response for that message. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: don't put code in declaration.David Kershner1-8/+6
Simplify the code by not putting the assignment in the declaration. Define it and then assign it, so the function doesn't get bunched up on the right. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: use guid_is_equal instead of memcmpDavid Kershner1-3/+2
The function publish_vbus_dev_info was doing a memcmp of guids. It should be using the kernel provided guid_equal function instead. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate commentsDavid Kershner1-25/+19
Use all 80 characters of the line for comments to help reduce the number of extra lines in the code. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: visorbus_private.h remove extra blank linesDavid Kershner1-2/+0
Remvoe several unneeded blank lines. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: fix alignment of paranethesisDavid Kershner1-5/+4
Correct indenting of parameters when calling the functions in the file visorchipset.c. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys; visorbus: visorchipset.c: remove extraneous newlineDavid Kershner1-19/+12
Use all 80 characters when calling functions. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: visorchannel: use 80 characters for commentsDavid Kershner1-18/+17
In the file visorhcannel.c use all 80 characters for comments instead of shortening them. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: clean up parser_string_get functionDavid Kershner1-20/+4
The function parser_string_get was writing its own strnlen function, use the kernel version instead. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: don't need local variable cmdDavid Kershner1-2/+1
The local variable cmd was just being used to dereference a field inside of it. Get rid of the variable and just derefernce the parameter being passed in. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-28staging: unisys: visorbus: simplify commenting in controlvm_initDavid Kershner1-6/+2
During the process of udpating the features bits, put a block comment for all updates instead of a separate comment for each one. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18staging: unisys/visorbus: add __init/__exit annotationsArnd Bergmann1-2/+2
gcc-4.6 causes a harmless warning about the init function: WARNING: vmlinux.o(.text+0xed62c2): Section mismatch in reference from the function init_unisys() to the function .init.text:visorutil_spar_detect() The function init_unisys() references the function __init visorutil_spar_detect(). This is often because init_unisys lacks a __init annotation or the annotation of visorutil_spar_detect is wrong. It appears that newer versions inline visorutil_spar_detect(), end up with an empty __init section. This marks the module entry points as __init and __exit respectively, which avoids the warning and slightly reduces the runtime code size. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-07Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds1-72/+54
Pull SCSI updates from James Bottomley: "This is mostly updates of the usual suspects: lpfc, qla2xxx, hisi_sas, megaraid_sas, zfcp and a host of minor updates. The major driver change here is the elimination of the block based cciss driver in favour of the SCSI based hpsa driver (which now drives all the legacy cases cciss used to be required for). Plus a reset handler clean up and the redo of the SAS SMP handler to use bsg lib" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (279 commits) scsi: scsi-mq: Always unprepare before requeuing a request scsi: Show .retries and .jiffies_at_alloc in debugfs scsi: Improve requeuing behavior scsi: Call scsi_initialize_rq() for filesystem requests scsi: qla2xxx: Reset the logo flag, after target re-login. scsi: qla2xxx: Fix slow mem alloc behind lock scsi: qla2xxx: Clear fc4f_nvme flag scsi: qla2xxx: add missing includes for qla_isr scsi: qla2xxx: Fix an integer overflow in sysfs code scsi: aacraid: report -ENOMEM to upper layer from aac_convert_sgraw2() scsi: aacraid: get rid of one level of indentation scsi: aacraid: fix indentation errors scsi: storvsc: fix memory leak on ring buffer busy scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough scsi: smartpqi: remove the smp_handler stub scsi: hpsa: remove the smp_handler stub scsi: bsg-lib: pass the release callback through bsg_setup_queue scsi: Rework handling of scsi_device.vpd_pg8[03] scsi: Rework the code for caching Vital Product Data (VPD) scsi: rcu: Introduce rcu_swap_protected() ...
2017-09-01staging: unisys: visorbus: make two functions staticColin Ian King1-3/+3
The functions sig_queue_offset and sig_data_offset are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'sig_queue_offset' was not declared. Should it be static? symbol 'sig_data_offset' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: change pr_err to dev_err in visor_check_channelSameer Wadgaonkar3-18/+23
Changing pr_err to dev_err in visor_check_channel. Added device as an argument to visor_check_channel to pass into dev_err. Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: remove EXPORT_SYMBOL_GPL for visor_check_channelSameer Wadgaonkar1-1/+0
Removing EXPORT_SYMBOL_GPU from visor_check_channel since it is used only in visorbus. Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: Fix up GUID definitionDavid Kershner1-3/+2
Fix up the GUID definition to remove some checkpatch warnings as well as using the whole width of the screen. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: just check for GUIDDavid Kershner1-3/+1
Every channel_type must have a valid GUID, checking for the name was just redundant. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: Use size of channel defined in the channel.David Kershner3-50/+22
The size of the channel should be pulled from the channel header, not from the message. All channels must be at least the size of the channel_header. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visornic: Remove unnecessary return valuesDavid Binder1-10/+3
Removes unnecessary return value in send_rcv_posts_if_needed(), since NAPI polling functions do not return errors. Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: use all 80 characters for multi-line messagesDavid Kershner1-19/+16
The file visorchipset had a bunch of comments that were not using the full screen before they wrapped, update the comments to wrap at 80 characters instead. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorchipset: Shorten parser_init_byte_stream.David Kershner1-4/+3
Shorten the name of the function parser_init_byte_stream to just parser_init_stream. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: Move parser functions location in file.David Kershner1-58/+58
The parser functions were defined at the top of the file even though they were not referenced until later in the file. This patch moves them closer to where they are defined so they can be easily referenced. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: remove uneeded initializationsDavid Kershner1-2/+2
Several variables were initialized when not needed. Remove the extraneous initializations. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: Remove useless else clause in visorutil_spar_detect.David Kershner1-2/+1
The function visorutil_spar_detect had an if clause that returns from the function, no need to do the rest of the code in an else clause. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: Change data to point to visor_controlvm_parameters_header.David Kershner1-14/+9
The data field was being defined as a character array and then casted into a visor_controlvm_parameters_header structure. This patch converts it to just point to the visor_controlvm_parameters_header structure. The data following the header is still behind the header_info. Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: Split else if blocks into multiple if.David Kershner1-2/+4
Visorbus_configure had a block of "else if" clauses at the beginning of the function. Simplify this to just being "if" clauses since each code block ended with a goto. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: Remove check for valid parm_addr.David Kershner1-1/+1
The variable parm_addr will never be null, so no need to check for it. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-31staging: unisys: visorbus: Remove useless initialization.David Kershner1-3/+0
The variable ctx was allocated with kzalloc, so all the data inside is zero, no need to reset it to 0. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>